public class StringUtils extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
StringUtils()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areEqual(String expected,
String actual) |
static boolean |
isEmpty(String str)
Check is a String is empty ("") or null.
|
static String |
join(Collection<?> collection,
String inputSeparator)
Joins the elements of the provided collection into a single string containing the provided elements.
|
static String |
substringAfterLast(String str,
String pattern) |
public static boolean isEmpty(String str)
str - String to inspect.public static String substringAfterLast(String str, String pattern)
str - the string to search inpattern - the pattern to search in strstr after the last occurrence of pattern, or the full str if
pattern does not appearpublic static boolean areEqual(String expected, String actual)
expected - the expected stringactual - the actual stringtrue if the given strings are equal, false otherwisepublic static String join(Collection<?> collection, String inputSeparator)
null separator is the same as an empty string ("").collection - the collection of values to join together, may be nullinputSeparator - the separator string to use, null treated as ""Copyright © 2004–2016 XWiki. All rights reserved.