Class StringUtils
java.lang.Object
org.apache.myfaces.tobago.internal.util.StringUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringconstantToLowerCamelCase(String constant) static StringconstantToUpperCamelCase(String constant) static booleancontainsAny(String str, String searchChars) Checks if the String contains any character in the given set of characters.static StringdefaultString(String string) Basically taken from commons-langstatic booleanBasically taken from commons-langstatic booleanequalsIgnoreCaseAndWhitespace(String type1, String type2) Is the same string, by ignoring differences that are only whitespaces.static StringfirstToUpperCase(String string) static int[]getIndices(String list) static booleanBasically taken from commons-langstatic booleanisAlphanumeric(String str) Basically taken from commons-langstatic booleanBasically taken from commons-langstatic booleanBasically taken from commons-langstatic booleanisNotBlank(String str) Basically taken from commons-langstatic booleanisNotEmpty(String value) Basically taken from commons-langstatic booleanChecks if the String starts like a url, e.g. http: or xyz:static StringBasically taken from commons-langstatic <T> StringjoinWithSurroundingSeparator(List<T> list) static booleanBasically taken from commons-langparseIntegerList(String integerList) parseIntegerList(String integerList, String delimiters) static StringBasically taken from commons-langstatic StringBasically taken from commons-langstatic String[]Basically taken from commons-langstatic String[]Basically taken from commons-langstatic booleanstartsWith(String string, String prefix) static StringtoConfidentialString(String string, boolean confidential) Returns a string of the same length to hide confidential passwords from log files etc.static Stringuncapitalize(String str) Basically taken from commons-lang
-
Method Details
-
parseIntegerList
- Throws:
NumberFormatException
-
parseIntegerList
public static List<Integer> parseIntegerList(String integerList, String delimiters) throws NumberFormatException - Throws:
NumberFormatException
-
joinWithSurroundingSeparator
-
getIndices
-
constantToLowerCamelCase
-
constantToUpperCamelCase
-
firstToUpperCase
-
equalsIgnoreCaseAndWhitespace
Is the same string, by ignoring differences that are only whitespaces. (null and "" are not equal) -
endsWith
Basically taken from commons-lang -
split
Basically taken from commons-lang -
split
Basically taken from commons-lang -
isAlpha
Basically taken from commons-lang -
isEmpty
Basically taken from commons-lang -
isNotEmpty
Basically taken from commons-lang -
isBlank
Basically taken from commons-lang -
isNotBlank
Basically taken from commons-lang -
replace
Basically taken from commons-lang -
repeat
Basically taken from commons-lang -
toConfidentialString
Returns a string of the same length to hide confidential passwords from log files etc. -
uncapitalize
Basically taken from commons-lang -
isAlphanumeric
Basically taken from commons-lang -
join
Basically taken from commons-lang -
defaultString
Basically taken from commons-lang -
notEquals
Basically taken from commons-lang -
isUrl
Checks if the String starts like a url, e.g. http: or xyz: -
startsWith
-
containsAny
Checks if the String contains any character in the given set of characters.
A
nullString will returnfalse. Anullsearch string will returnfalse.StringUtils.containsAny(null, *) = false StringUtils.containsAny("", *) = false StringUtils.containsAny(*, null) = false StringUtils.containsAny(*, "") = false StringUtils.containsAny("zzabyycdxx", "za") = true StringUtils.containsAny("zzabyycdxx", "by") = true StringUtils.containsAny("aba","z") = false- Parameters:
str- the String to check, may be nullsearchChars- the chars to search for, may be null- Returns:
- the
trueif any of the chars are found,falseif no match or null input Basically taken from commons-lang
-