public final class Strings
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NEWLINE
The current VM's newline string.
|
| Constructor and Description |
|---|
Strings() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEmpty(java.lang.String s)
Check whether a string is empty (null or "").
|
static boolean |
notEmpty(java.lang.String s)
Check whether a string is not empty (not null and not "").
|
static java.lang.String |
remove(java.lang.String s,
char c)
Remove all occurrences of specific character from a string.
|
static java.lang.String |
safeTrim(java.lang.String s)
Perform a safe trim on a string that may be null.
|
public static boolean isEmpty(java.lang.String s)
s - The string to check.public static boolean notEmpty(java.lang.String s)
s - The string to check.public static java.lang.String safeTrim(java.lang.String s)
s - The string to trim or null.public static java.lang.String remove(java.lang.String s,
char c)
s - The string to remove the character from.c - The character to remove.