public final class Strings extends Object
Modifier and Type | Method and Description |
---|---|
static String |
after(String text,
String after)
Returns the string after the given token
|
static String |
between(String text,
String start,
String end)
Clips the text between the start and end markers
|
static String |
canonicalClassName(String className)
Returns the canonical class name by removing any generic type information.
|
static String |
doubleQuote(String text)
Returns the text wrapped double quotes
|
static String |
getOrElse(String text,
String defaultValue)
Returns the value or the defaultValue if it is null
|
static boolean |
isNullOrEmpty(String text)
Returns true if the given text is null or empty string or has null as the value
|
static String |
quote(String text,
String quote)
Wraps the text in the given quote text
|
static String |
safeNull(String text) |
static String |
singleQuote(String text)
Returns the text wrapped single quotes
|
public static boolean isNullOrEmpty(String text)
public static String getOrElse(String text, String defaultValue)
public static String after(String text, String after)
text
- the textafter
- the tokenpublic static String canonicalClassName(String className)
public static String quote(String text, String quote)
text
- the text to wrap in quotesquote
- the quote text added to the prefix and postfix of the textApache Camel