StringUtil
Provides common string function support.
Function | Description | Datatype | |||||
---|---|---|---|---|---|---|---|
capitalize(String str) | Capitalizes a String, Changing the first character to title case. |
|
| ||||
compare(String str1, String str2) | Compare two Strings lexicographically.
|
|
| ||||
compare(String str1, String str2, boolean nullIsLess) | Compare two Strings lexicographically.
|
|
| ||||
compareIgnoreCase(String str1, String str2) | Compare two Strings lexicographically, ignoring case differences.
|
|
| ||||
compareIgnoreCase(String str1, String str2, boolean nullIsLess) | Compare two Strings lexicographically, ignoring case differences.
|
|
| ||||
countMatches(String str, String pattern) | Returns the number of times the pattern appears in the string |
|
| ||||
indexOf(String str, String search) | Returns the index (Starts with zero) within the String of the first occurrence of the specified search String. |
|
| ||||
indexOf(String str, String search, int startPos) | Returns the index (Starts with zero) within the String of the first occurrence of the specified search String starting from the provided zero based index |
|
| ||||
indexOfIgnoreCase(String str, String search) | Returns the case insensitive index (Starts with zero) within the String of the first occurrence of the specified search String. |
|
| ||||
indexOfIgnoreCase(String str, String search, int startPos) | Returns the case insensitive index (Starts with zero) within the String of the first occurrence of the specified search String starting from the provided zero based index. |
|
| ||||
isAllLowerCase(String str) | Checks if the String contains only lowercase characters. |
|
| ||||
isAllUpperCase(String str) | Checks if the String contains only uppercase characters. |
|
| ||||
isAlpha(String str) | Checks if the String contains only unicode letters. |
|
| ||||
isAlphanumeric(String str) | Checks if the String contains only unicode letters or digits. |
|
| ||||
isAlphanumericSpace(String str) | Checks if the String contains only unicode letters, digits or space. |
|
| ||||
isAlphaSpace(String str) | Checks if the string contains only unicode letters or space. |
|
| ||||
isNumeric(String str) | Checks if the String contains only unicode digits. |
|
| ||||
isNumericSpace(String str) | Checks if the String contains only unicode digits or space. |
|
| ||||
isWhitespace(String str) | Checks if the String contains only whitespace. |
|
| ||||
lastIndexOf(String str, String search) | Returns the index (Starts with zero) within the String of the last occurrence of the specified search String. |
| |||||
lastIndexOf(String str, String search, int startPos) | Returns the index (Starts with zero) within the String of the last occurrence of the specified search String starting from the provided zero based index. |
| |||||
lastIndexOfIgnoreCase(String str, String search) | Returns the case insensitive index (Starts with zero) within the String of the last occurrence of the specified search String. |
|
| ||||
lastIndexOf(String str, String search, int startPos) | Returns the case insensitive index (Starts with zero) within the String of the last occurrence of the specified search String starting from the provided zero based index. |
|
| ||||
leftPad(String str, int size) | Left pad a String with spaces. |
|
| ||||
repeat(String str, int repeat) | Repeat a String repeat times to form a new String. |
|
| ||||
repeat(String str, String separator, int repeat) | Repeat a String repeat times to form a new String, with a String separator injected each time. |
| |||||
reverse(String str) | Reverses a String |
|
| ||||
rightPad(String str, int size) | Right pad a String with spaces. |
|
| ||||
splitByCharacterType(String str) | Splits a String into an array of String with each element containing a substring based on the character type. |
|
| ||||
splitByCharacterTypeCamelCase(String str) | Splits a String into an array of String with each element containing a substring based on the character type with the special case to maintain one upper case letter followed by some lower case letters as an element. |
|
| ||||
swapCase(String str) | Swaps the case of a String changing upper and title case to lower case, and lower case to upper case. |
|
| ||||
trim(String str) | Removes whitespace from both ends of the String. |
|
| ||||
uncapitalize(String str) | Uncapitalizes a String, changing the first character to lower case . |
|
|