public final class Strings extends Object
Internal API: these methods are part of the internal API and may be removed, have their signature change, or have their access level decreased from public to protected, package, or private in future versions without notice.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNotBlank(String value)
Check that given string is not blank.
|
static boolean |
isNotEmpty(String value)
Check if given string is not
null and not empty. |
static String |
nullToEmpty(String value)
Returns empty string if
value is null, returns value
otherwise. |
static String |
removePrefix(String value,
String prefix)
Remove string prefix if and only if string value starts with
the prefix, otherwise original string is returned.
|
static String |
toLowerCase(String value)
Returns the lowercase value of a given string:
Returns
null if value is null.
Returns the result of String.toLowerCase() otherwise.
|
public static String nullToEmpty(String value)
value is null, returns value
otherwise.value - Given value.public static boolean isNotEmpty(String value)
null and not empty.value - Value to check.true if value is not null and not empty, false otherwise.public static boolean isNotBlank(String value)
value - String to check.true if string is not blank, false otherwise.public static String removePrefix(String value, String prefix)
value - String value.prefix - String prefix.public static String toLowerCase(String value)
null if value is null.String.toLowerCase() otherwise.value - The string value.Copyright © 2019. All rights reserved.