public final class StringUtil extends Object
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
defaultString(String text)
Returns either the passed in String, or if the String is
null, an empty String (""). |
static String |
getStackTrace(Throwable throwable)
Fetches the stack trace of an exception as a String.
|
static boolean |
isExpression(String text)
Checks whether a
String seams to be an expression or not |
static String |
join(String delimiter,
String... parts)
Joins a list of Strings to a single one.
|
static String[] |
split(String text,
String regex)
Splits a
String by an expression. |
public static boolean isExpression(String text)
String seams to be an expression or nottext - the text to checkpublic static String[] split(String text, String regex)
String by an expression.text - the text to splitregex - the regex to split bypublic static String join(String delimiter, String... parts)
delimiter - the delimiter between the joined partsparts - the parts to joinpublic static String defaultString(String text)
null, an empty String ("").
StringUtils.defaultString(null) = ""
StringUtils.defaultString("") = ""
StringUtils.defaultString("bat") = "bat"
text - the String to check, may be nullnullCopyright © 2014–2020 Camunda Services GmbH. All rights reserved.