public final class Strings extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isBlank(String s)
Checks whether a String is null, empty or blank.
|
static boolean |
isEmpty(String s)
Checks whether a String is null or empty.
|
static boolean |
isNotEmpty(String s)
Checks whether a String is neither null nor empty.
|
static boolean |
isNull(String s)
Checks whether a String is null.
|
static String |
toLowerCase(String s)
null-safe lower-case conversion of a String.
|
static String |
trim(String s)
Removes the whitespace at the beginning and end of a String.
|
static String |
trimToEmpty(String s)
Removes the whitespace at the beginning and end of a String.
|
static String |
trimToNull(String s)
Removes the whitespace at the beginning and end of a String.
|
public static boolean isNull(String s)
s
- The String to checkpublic static boolean isEmpty(String s)
s
- The String to checkpublic static boolean isNotEmpty(String s)
s
- The String to checkpublic static boolean isBlank(String s)
s
- The String to checkpublic static String trim(String s)
s
- The String to trim, may be nullpublic static String trimToNull(String s)
s
- The String to trim, may be nullpublic static String trimToEmpty(String s)
s
- The String to trim, may be nullCopyright © 2020. All rights reserved.