Modifier and Type | Method and Description |
---|---|
static boolean |
isBlank(String string)
Check if the String is null or has only whitespaces.
|
static boolean |
isEmpty(String string)
Check if the String is null or empty.
|
static boolean |
isNotBlank(String string)
Check if the String has any non-whitespace character.
|
static boolean |
isNotEmpty(String string)
Check if the String has any character.
|
static String |
truncate(String string,
int maxLength)
Truncate the String to the max length.
|
public static boolean isBlank(@Nullable String string)
org.apache.commons.lang.StringUtils#isBlank(String)
.string
- String to checktrue
if the String is null or has only whitespacespublic static boolean isNotBlank(@Nullable String string)
string
- String to checktrue
if the String has any non-whitespace characterpublic static boolean isEmpty(@Nullable String string)
string
- String to checktrue
if the String is null or emptypublic static boolean isNotEmpty(@Nullable String string)
string
- String to checktrue
if the String has any characterCopyright © 2019. All rights reserved.