isBlank(CharSequence cs)
Checks if a CharSequence is whitespace, empty ("") or null
- public static boolean isBlank(CharSequence cs)
- Checks if a CharSequence is whitespace, empty ("") or null.
- StringUtils.isBlank(null) = true
- StringUtils.isBlank("") = true
- StringUtils.isBlank(" ") = true
- StringUtils.isBlank("bob") = false
- StringUtils.isBlank(" bob ") = false
isEmpty(CharSequence cs)
Checks if a CharSequence is empty ("") or null
- public static boolean isEmpty(CharSequence cs)
- Checks if a CharSequence is empty ("") or null.
- StringUtils.isEmpty(null) = true
- StringUtils.isEmpty("") = true
- StringUtils.isEmpty(" ") = false
- StringUtils.isEmpty("bob") = false
- StringUtils.isEmpty(" bob ") = false
Checks if a CharSequence is not empty (""), not null and not whitespace only.
- public static boolean isNotBlank(CharSequence cs)
- Checks if a CharSequence is not empty (""), not null and not whitespace only.
- StringUtils.isNotBlank(null) = false
- StringUtils.isNotBlank("") = false
- StringUtils.isNotBlank(" ") = false
- StringUtils.isNotBlank("bob") = true
- StringUtils.isNotBlank(" bob ") = true
Checks if a CharSequence is not empty ("") and not null.
- public static boolean isNotEmpty(CharSequence cs)
- Checks if a CharSequence is not empty ("") and not null.
- StringUtils.isNotEmpty(null) = false
- StringUtils.isNotEmpty("") = false
- StringUtils.isNotEmpty(" ") = true
- StringUtils.isNotEmpty("bob") = true
- StringUtils.isNotEmpty(" bob ") = true