public class StringUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
EMPTY_STRING_ARRAY |
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEmpty(java.lang.String str)
Checks if a String is empty ("") or null.
|
static boolean |
isNotEmpty(java.lang.String str)
Checks if a String is not empty ("") and not null.
|
static java.lang.String |
replaceAll(java.lang.String line,
java.lang.String oldString,
java.lang.String newString)
Replace the oldString by the newString in the line and returns the result.
|
static java.lang.String |
replaceNonUnicodeChars(java.lang.String text) |
static java.lang.String |
toHexString(Color colour)
Color to hex representation
|
public static boolean isEmpty(java.lang.String str)
Checks if a String is empty ("") or null.
StringUtils.isEmpty(null) = true StringUtils.isEmpty("") = true
StringUtils.isEmpty(" ") = false StringUtils.isEmpty("bob") = false
StringUtils.isEmpty(" bob ") = false
str - the String to check, may be nulltrue if the String is empty or nullpublic static boolean isNotEmpty(java.lang.String str)
Checks if a String is not empty ("") and not null.
StringUtils.isNotEmpty(null) = false
StringUtils.isNotEmpty("") = false
StringUtils.isNotEmpty(" ") = true
StringUtils.isNotEmpty("bob") = true
StringUtils.isNotEmpty(" bob ") = true
str - the String to check, may be nulltrue if the String is not empty and not nullpublic static final java.lang.String replaceAll(java.lang.String line,
java.lang.String oldString,
java.lang.String newString)
line - the line to replace.oldString - old token to replace.newString - new token to replace.public static java.lang.String replaceNonUnicodeChars(java.lang.String text)
public static java.lang.String toHexString(Color colour)
colour - Copyright © 2019. All Rights Reserved.