public final class StringUtils extends Object
CharSequence
.Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isBlank(CharSequence value)
Check whether the given string value is blank.
|
static boolean |
isEmpty(CharSequence value)
Check whether the given string value is empty.
|
static boolean |
notBlank(CharSequence value)
Check whether the given string value is not blank.
|
static boolean |
notEmpty(CharSequence value)
Check whether the given string value is not empty.
|
static String |
stripAccent(CharSequence value)
Remove diacritics (accents) from a
CharSequence . |
static String |
stripIndent(CharSequence text)
Strip the leading indentation from the given text.
|
static String |
stripMargin(CharSequence text)
Strip leading whitespace/control characters followed by '|' from every line in the given text.
|
public static boolean isEmpty(CharSequence value)
value
- the string value to testpublic static boolean notEmpty(CharSequence value)
value
- the string value to testpublic static boolean isBlank(CharSequence value)
value
- the string value to testpublic static boolean notBlank(CharSequence value)
value
- the string value to testpublic static String stripAccent(CharSequence value)
CharSequence
.value
- the string to be strippedpublic static String stripIndent(CharSequence text)
The line with the least number of leading spaces determines the number to remove. Lines only containing whitespace are ignored when calculating the number of leading spaces to strip.
text
- the text to strip indent frompublic static String stripMargin(CharSequence text)
text
- the text to strip the margin from