public class StringUtils extends Object
| 构造器和说明 |
|---|
StringUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
defaultString(Object str)
Returns either the passed in String, or if the String is
null, an empty String (""). |
static boolean |
isBlank(CharSequence cs)
Is blank boolean.
|
static boolean |
isEmpty(CharSequence cs)
Is empty boolean.
|
static boolean |
isNotBlank(CharSequence cs)
Is not blank boolean.
|
static boolean |
isNotEmpty(CharSequence cs)
Is not empty boolean.
|
static String |
toString(Object o)
To string string.
|
static String |
toString(Object o,
String defaultVal)
To string string.
|
public static boolean isEmpty(CharSequence cs)
cs - the cspublic static boolean isNotEmpty(CharSequence cs)
cs - the cspublic static boolean isBlank(CharSequence cs)
cs - the cspublic static boolean isNotBlank(CharSequence cs)
cs - the cspublic static String defaultString(Object str)
null, an empty String ("").
StringUtils.defaultString(null) = ""
StringUtils.defaultString("") = ""
StringUtils.defaultString("bat") = "bat"
str - the String to check, may be nullnullString#valueOf(Object)public static String toString(Object o, String defaultVal)
o - the odefaultVal - the default valCopyright © 2023 The Ant Financial. All rights reserved.