public final class StringUtils
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
StringUtils()
Constructor
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
concat(java.util.Collection l,
java.lang.String delimiter)
Concat the collection l to string with delimenter
|
static java.lang.String |
concat(java.lang.Object[] objects,
java.lang.String delimiter)
Concant the object in the array (using objects.toString()), delimited by delimiter
|
static boolean |
isNullOrEmpty(java.lang.Object strObject)
Whether the string is empty
|
static boolean |
isNullOrEmpty(java.lang.String str)
Whether the string is empty
|
static java.lang.String |
substringAfter(java.lang.String str,
java.lang.String pattern)
Return the substring after the first occurrance of pattern
|
static java.lang.String |
substringAfterLast(java.lang.String str,
java.lang.String pattern)
Return substring of str after the the last occurrance of pattern
|
static java.lang.String |
substringBeforeLast(java.lang.String str,
java.lang.String pattern)
Return substring of str before the last occurrance of str
|
public static java.lang.String concat(java.util.Collection l, java.lang.String delimiter)
l
- the collectiondelimiter
- the delimiterpublic static java.lang.String concat(java.lang.Object[] objects, java.lang.String delimiter)
objects
- the objectsdelimiter
- the delimiterpublic static java.lang.String substringAfter(java.lang.String str, java.lang.String pattern)
str
- the strpattern
- the patternpublic static java.lang.String substringAfterLast(java.lang.String str, java.lang.String pattern)
str
- the strpattern
- the patternpublic static java.lang.String substringBeforeLast(java.lang.String str, java.lang.String pattern)
str
- the strpattern
- the patternpublic static boolean isNullOrEmpty(java.lang.String str)
str
- whether is null or zero length (after trim)public static boolean isNullOrEmpty(java.lang.Object strObject)
str
- whether is null or zero length (after trim)