public class StringUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern[] |
PATTERNS |
static String[] |
REPLACES |
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
fromBytesToHex(byte[] b) |
static byte[] |
fromHexToBytes(String hex) |
static String |
fromHexToString(String hex) |
static String |
fromStringToHex(String s) |
static String |
invert(String s) |
static boolean |
isEmpty(String str)
Checks if String is null or empty.
|
static boolean |
isNotEmpty(String s) |
static Number |
parseCurrencyNumber(String value,
Locale loc)
Convert Money value as String to a Number
|
static String |
randomNumber(int size) |
static String |
randomString(int size) |
static String |
randomString(int size,
boolean onlyChars) |
static String |
randomString(int size,
boolean onlyChars,
boolean upcase) |
static String |
removeAccents(String text) |
static String[] |
slice(String line)
Turns a line with strings separated by one
or more spaces into a String array.
|
static String[] |
split(String line) |
public static boolean isNotEmpty(String s)
public static boolean isEmpty(String str)
str - Stringpublic static String[] slice(String line)
line - The line to be slicedpublic static String randomString(int size)
public static String randomString(int size, boolean onlyChars)
public static String randomNumber(int size)
public static String randomString(int size, boolean onlyChars, boolean upcase)
public static String fromBytesToHex(byte[] b)
public static byte[] fromHexToBytes(String hex)
public static Number parseCurrencyNumber(String value, Locale loc) throws ParseException
value - loc - (Optional) Default is LocaleManager.DEFAULT_LOCALEParseExceptionCopyright © 2015. All Rights Reserved.