public class StringUtils extends Object
| 构造器和说明 |
|---|
StringUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isBlank(CharSequence cs)
Checks if a CharSequence is empty (""), null or whitespace only.
|
static boolean |
isNotBlank(CharSequence cs)
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.
Whitespace is defined by Character.isWhitespace(char).
StringUtils.isNotBlank(null) = false
StringUtils.isNotBlank("") = false
StringUtils.isNotBlank(" ") = false
StringUtils.isNotBlank("bob") = true
StringUtils.isNotBlank(" bob ") = true
cs - the CharSequence to check, may be nulltrue if the CharSequence is
not empty and not null and not whitespace onlypublic static boolean isBlank(CharSequence cs)
Checks if a CharSequence is empty (""), null or whitespace only.
Whitespace is defined by Character.isWhitespace(char).
StringUtils.isBlank(null) = true
StringUtils.isBlank("") = true
StringUtils.isBlank(" ") = true
StringUtils.isBlank("bob") = false
StringUtils.isBlank(" bob ") = false
cs - the CharSequence to check, may be nulltrue if the CharSequence is null, empty or whitespace onlyCopyright © 2019. All rights reserved.