Value of the empty String
Value of the String type (as returned by typeof
operator)
Value of the white space String
Checks if a String is whitespace, empty ("") or null.
StringUtils.isEmpty(null) = true
StringUtils.isEmpty("") = true
StringUtils.isEmpty(" ") = true
StringUtils.isEmpty("bob") = false
StringUtils.isEmpty(" bob ") = false
the String to check, may be null
true if the String is null, empty or whitespace
Checks if a String is whitespace, empty ("") or null.
StringUtils.isEmpty(null) = true
StringUtils.isEmpty("") = true
StringUtils.isEmpty(" ") = false
StringUtils.isEmpty("bob") = false
StringUtils.isEmpty(" bob ") = false
the String to check, may be null
true if the String is empty or null
Checks if a String is not empty (""), not null and not whitespace only.
StringUtils.isEmpty(null) = false
StringUtils.isEmpty("") = false
StringUtils.isEmpty(" ") = false
StringUtils.isEmpty("bob") = true
StringUtils.isEmpty(" bob ") = true
the String to check, may be null
true if the String is not empty and not null and not whitespace
Checks if a String is not empty ("") and not null.
StringUtils.isEmpty(null) = false
StringUtils.isEmpty("") = false
StringUtils.isEmpty(" ") = true
StringUtils.isEmpty("bob") = true
StringUtils.isEmpty(" bob ") = true
the String to check, may be null
true if the String is not empty and not null
A couple of utility methods for working with strings.
1.0