List of utility methods to do String Strip
String | stripSuffixIgnoreCase(String str, String suffix) Case insensitive version of stripSuffix. return endsWithIgnoreCase(str, suffix) ? str.substring(0,
str.length() - suffix.length()) : null;
|
String | stripSuffix(String str, String suffix) Give me a string and a potential suffix, and I return the string before the suffix if the suffix matches, else null. return str.endsWith(suffix) ? str.substring(0, str.length()
- suffix.length()) : null;
|
String | stripPrefixIgnoreCase(String str, String prefix) Case insensitive version of stripPrefix. return startsWithIgnoreCase(str, prefix) ? str.substring(prefix
.length()) : null;
|
String | stripPrefix(String str, String prefix) Give me a string and a potential prefix, and I return the string following the prefix if the prefix matches, else null. return str.startsWith(prefix) ? str.substring(prefix.length())
: null;
|
String | stripPrefixIgnoreCase(String str, String prefix) Case insensitive version of stripPrefix. return startsWithIgnoreCase(str, prefix) ? str.substring(prefix
.length()) : null;
|
String | stripPrefix(String str, String prefix) Give me a string and a potential prefix, and I return the string following the prefix if the prefix matches, else null. return str.startsWith(prefix) ? str.substring(prefix.length())
: null;
|
String | stripSuffix(String str, String suffix) Give me a string and a potential suffix, and I return the string before the suffix if the suffix matches, else null. return str.endsWith(suffix) ? str.substring(0, str.length()
- suffix.length()) : null;
|
String | stripSuffixIgnoreCase(String str, String suffix) Case insensitive version of stripSuffix. return endsWithIgnoreCase(str, suffix) ? str.substring(0,
str.length() - suffix.length()) : null;
|
String | strip(String str, String stripChars) strip if (isEmpty(str)) { return str; String srcStr = str; srcStr = stripStart(srcStr, stripChars); return stripEnd(srcStr, stripChars); |
String | strip(String str, String stripChars) strip if (isEmpty(str)) { return str; str = stripStart(str, stripChars); return stripEnd(str, stripChars); |