public class StringUtil extends Object
| 构造器和说明 |
|---|
StringUtil() |
public static boolean hasText(CharSequence str)
CharSequence contains actual text.
More specifically, this method returns true if the
CharSequence is not null, its length is greater than
0, and it contains at least one non-whitespace character.
StringUtils.hasText(null) = false
StringUtils.hasText("") = false
StringUtils.hasText(" ") = false
StringUtils.hasText("12345") = true
StringUtils.hasText(" 12345 ") = true
str - the CharSequence to check (may be null)true if the CharSequence is not null,
its length is greater than 0, and it does not contain whitespace onlyCharacter.isWhitespace(char)public static boolean hasText(String str)
String contains actual text.
More specifically, this method returns true if the
String is not null, its length is greater than 0,
and it contains at least one non-whitespace character.
str - the String to check (may be null)true if the String is not null, its
length is greater than 0, and it does not contain whitespace onlyhasText(CharSequence)Copyright © 2020. All rights reserved.