public class StringUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
equals(String a,
String b)
Equals boolean.
|
static boolean |
equalsIgnoreCase(String a,
String b)
Equals ignore case boolean.
|
static String |
hump2Line(String str)
hump to Line or line to hump, only spring environment use
|
static byte[] |
inputStream2Bytes(InputStream is)
Input stream to byte array
|
static String |
inputStream2String(InputStream is)
Input stream 2 string string.
|
static boolean |
isBlank(String str)
Is blank string ?
|
static boolean |
isEmpty(CharSequence cs)
Checks if a CharSequence is empty ("") or null.
|
static boolean |
isNotBlank(String str)
Is Not blank string ?
|
static boolean |
isNotEmpty(CharSequence cs)
Checks if a CharSequence is not empty ("") and not null.
|
static boolean |
isNullOrEmpty(String str)
Is empty boolean.
|
static String |
toString(Object obj)
Object.toString()
|
static String |
trim(String str)
Trim string, or null if string is null.
|
static String |
trimToNull(String str)
Trim string to null if empty("").
|
public static boolean isNullOrEmpty(String str)
str - the strpublic static boolean isBlank(String str)
str - the strpublic static boolean isNotBlank(String str)
str - the strpublic static boolean equals(String a, String b)
a - the ab - the bpublic static boolean equalsIgnoreCase(String a, String b)
a - the ab - the bpublic static String inputStream2String(InputStream is)
is - the ispublic static byte[] inputStream2Bytes(InputStream is)
is - the ispublic static String toString(Object obj)
obj - the objpublic static String trimToNull(String str)
str - the String to be trimmed, may be nullpublic static String trim(String str)
str - the String to be trimmed, may be nullnull if null String inputpublic static boolean isEmpty(CharSequence cs)
cs - the CharSequence to check, may be nulltrue if the CharSequence is empty or nullpublic static boolean isNotEmpty(CharSequence cs)
cs - the CharSequence to check, may be nulltrue if the CharSequence is not empty and not nullCopyright © 2022 Seata. All rights reserved.