public class Strings extends Object
| Constructor and Description |
|---|
Strings() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNullOrEmpty(String string)
Returns
true if the given string is null or is the empty string. |
public static boolean isNullOrEmpty(String string)
true if the given string is null or is the empty string.
Consider normalizing your string references with #nullToEmpty. If you do, you can
use String.isEmpty() instead of this method, and you won't need special null-safe forms
of methods like String.toUpperCase(java.util.Locale) either. Or, if you'd like to normalize "in the other
direction," converting empty strings to null, you can use #emptyToNull.
string - a string reference to checktrue if the string is null or is the empty stringCopyright © 2016–2017. All rights reserved.