| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static boolean | Returns: true if the string contains the search string, or false if either is nullstring s, String substring to search for searchStr)Return true if the string contains the search string, ignoring case, or false if either is null. |
| public static boolean | Returns: true if equals, ignoring casefirst string s1, String second string s2)Null-safe case-insensitive equals. |
| public static boolean | Returns: true if all of the strings are blankstrings to check strings)Returns true if all of the strings passed in are blank, as determined by isBlank. |
| public static boolean | Returns: true if any of the strings are blankstrings to check strings)Returns true if any of the strings passed in are blank, as determined by isBlank. |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: true if none of the strings are blankstrings to check strings)Returns true if none of the strings passed in are blank, as determined by isBlank. |
| public static boolean | Returns: true if this string is not null and not just whitespace.the string s)Return true if this string is not null and not just whitespace. |
| public static boolean | Returns: true if not emptystring to check s)Returns true if the string is not empty. |
| public static String | Returns: joined stringcollection of objects objects, String delimiter between the objects delimiter)Join the collection of objects to a string. |
| public static String | |
| public static int | |
| public static String | |
| public static String | Returns: the random stringminimum length (inclusive) minLengthInclusive, int maximum length (exclusive) maxLengthExclusive)Returns a string of random alphabetic characters at least minLengthInclusive characters and less than maxLengthExclusive characters long. |
| public static String | Returns: the random stringlength in characters length)Returns a string of random alphabetic characters of the requested length. |
| public static String | Returns: the random stringminimum length (inclusive) minLengthInclusive, int maximum length (exclusive) maxLengthExclusive)Returns a string of random printable characters at least minLengthInclusive characters and less than maxLengthExclusive characters long. |
| public static String | Returns: the random stringlength in characters length)Returns a string of random printable characters of the requested length. |
| public static String | |
| public static String | |
| public static String | |
| public static StringUtils | |
| public static StringUtils[] |
| RANDOM | back to summary |
|---|---|
| private static final Random RANDOM | |
| StringUtils | back to summary |
|---|---|
| private StringUtils() | |
| contains | back to summary |
|---|---|
| public static boolean contains(String s, String searchStr) Return true if the string contains the search string, or false if either is null. | |
| containsIgnoreCase | back to summary |
|---|---|
| public static boolean containsIgnoreCase(String s, String searchStr) Return true if the string contains the search string, ignoring case, or false if either is null. | |
| equalsIgnoreCase | back to summary |
|---|---|
| public static boolean equalsIgnoreCase(String s1, String s2) Null-safe case-insensitive equals. | |
| isAllBlank | back to summary |
|---|---|
| public static boolean isAllBlank(String... strings) Returns true if all of the strings passed in are blank, as determined by isBlank.
| |
| isAnyBlank | back to summary |
|---|---|
| public static boolean isAnyBlank(String... strings) Returns true if any of the strings passed in are blank, as determined by isBlank.
| |
| isBlank | back to summary |
|---|---|
| public static boolean isBlank(String s) Return true if this string is either null or just whitespace.
| |
| isEmpty | back to summary |
|---|---|
| public static boolean isEmpty(String s) Returns true if the string is empty.
| |
| isNoneBlank | back to summary |
|---|---|
| public static boolean isNoneBlank(String... strings) Returns true if none of the strings passed in are blank, as determined by isBlank.
| |
| isNotBlank | back to summary |
|---|---|
| public static boolean isNotBlank(String s) Return true if this string is not null and not just whitespace.
| |
| isNotEmpty | back to summary |
|---|---|
| public static boolean isNotEmpty(String s) Returns true if the string is not empty.
| |
| join | back to summary |
|---|---|
| public static String join(Collection<?> objects, String delimiter) Join the collection of objects to a string. Objects that are null are represented by the empty string.
| |
| left | back to summary |
|---|---|
| public static String left(String s, int length) Return the first length characters of the string. | |
| length | back to summary |
|---|---|
| public static int length(String s) Return the length of the string, or 0 if the string is null.
| |
| random | back to summary |
|---|---|
| public static String random(int length, String allowed) Returns a string of the requested length, made up of characters from the allowed string. | |
| randomAlphabetic | back to summary |
|---|---|
| public static String randomAlphabetic(int minLengthInclusive, int maxLengthExclusive) Returns a string of random alphabetic characters at least minLengthInclusive characters and less than maxLengthExclusive characters long. The characters range from 'A' - 'Z' or from 'a' - 'z' (all inclusive).
| |
| randomAlphabetic | back to summary |
|---|---|
| public static String randomAlphabetic(int length) Returns a string of random alphabetic characters of the requested length. The characters range from 'A' - 'Z' or from 'a' - 'z' (all inclusive).
| |
| randomPrint | back to summary |
|---|---|
| public static String randomPrint(int minLengthInclusive, int maxLengthExclusive) Returns a string of random printable characters at least minLengthInclusive characters and less than maxLengthExclusive characters long. The characters have ASCII codes ranging from 32 to 125 (both inclusive) and include spaces.
| |
| randomPrint | back to summary |
|---|---|
| public static String randomPrint(int length) Returns a string of random printable characters of the requested length. The characters have ASCII codes ranging from 32 to 125 (both inclusive) and include spaces.
| |
| repeat | back to summary |
|---|---|
| public static String repeat(String substring, int count) Repeat the substring count times. | |
| replace | back to summary |
|---|---|
| public static String replace(String template, Map<String, String> replacements, String prefix, String suffix) Replace the placeholders in the template with the values in the replacement mapping. | |
| upperCase | back to summary |
|---|---|
| public static String upperCase(String s) Returns the string in uppercase, or null if it was null | |
| valueOf | back to summary |
|---|---|
| public static StringUtils valueOf(String name) | |
| values | back to summary |
|---|---|
| public static StringUtils[] values() | |