Commons-lang-stringutils

Source: Internet
Author: User
Tags control characters

Operations on that is String null safe.

Isempty/isblank -Checks if a string is empty (judging if the string is empty)

Trim/strip -removes leading and trailing whitespace (control characters before and after deletion, white space characters)

Equals -compares-strings null-safe (determines if strings are equal)

StartsWith -check if a String starts with a prefix null-safe

EndsWith -check if a String ends with a suffix null-safe

indexof/lastindexof/contains -Null-safe index-of Checks

indexofany/lastindexofany/indexofanybut/lastindexofanybut -index-of any of a set of Strings

Containsonly/containsnone/containsany -does String contains only/none/any of these characters

substring/left/right/mid -Null-safe Substring extractions

substringbefore/substringafter/substringbetween -substring extraction relative to other strings ( Gets the substring relative to the delimiter position)

Split/join -Splits a string to an array of substrings and vice versa (split, concatenation string)

remove/delete -Removes part of a String

Replace/overlay -Searches a string and replaces one string with another

chomp/chop -Removes the last part of a String

appendifmissing -Appends a suffix to the end of the string if not present (if the character does not end with the specified suffix, append the suffix back after the string)

prependifmissing -prepends a prefix to the start of the string if not present (if the character does not start with the specified prefix, the prefix is returned before the string)

leftpad/rightpad/center/Repeat -Pads a String

uppercase/lowercase/swapcase/capitalize/uncapitalize -Changes the case of a String (changing the casing of characters)

countmatches -counts the number of occurrences of one String in another

isalpha/isnumeric/iswhitespace/isasciiprintable -checks the characters in a String

defaultstring -protects against a null input String (prevent null)

Reverse/reversedelimited -Reverses a string (inverse string)

abbreviate -abbreviates a string using ellipsis

difference -compares Strings and reports on their differences

levenshteindistance -The number of changes needed to change one String into another

More:javadoc

Commons-lang-stringutils

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.