| Constructor and Description |
|---|
Strings() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isBlank(String string) |
static boolean |
isNotBlank(String string) |
static String |
leftPad(String s,
int n) |
static String |
reduceWhitespace(String string)
Reduces all whitespace in the given
String to a single space |
static String |
repeat(char character,
int count)
|
static void |
requireNonBlank(String string) |
static String |
rightPad(String s,
int n) |
static List<String> |
splitOnComma(String string) |
static List<String> |
splitOnWhitespace(String string) |
static boolean |
startsWithIgnoreCase(String string,
String prefix)
Check if string starts with prefix, case insensitive
|
public static boolean isBlank(String string)
public static boolean isNotBlank(String string)
public static void requireNonBlank(String string)
public static String reduceWhitespace(String string)
String to a single spacepublic static boolean startsWithIgnoreCase(String string, String prefix)
string - String to testprefix - String to check, not nulltrue if string starts with prefixNullPointerException - if prefix is nullpublic static String repeat(char character, int count)
character - char to repeatcount - intString, not nullCopyright © 2018. All rights reserved.