public class StringUtil extends Object
Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
checkTrailingSlash(String str)
Check a String for a trailing slash and adds a slash if there is none
|
static boolean |
containsIgnoreCase(String[] array,
String value)
Check if an array contains a specific value (with case-insensitive comparison).
|
static Boolean |
isNumeric(String str)
Check if a string is not null and a valid number
|
static Boolean |
isUri(String uriString)
Check if a String is an URI.
|
static String |
join(String[] array,
String separator)
Join an array of strings with a separator.
|
static String |
removeTrailingSlash(String str)
Check a String for trailing slash and removes it.
|
public static boolean containsIgnoreCase(String[] array, String value)
array
- The arrayvalue
- The value to searchpublic static String join(String[] array, String separator)
Note: This might be replaced by utility method from commons-lang or guava someday if one of those libraries is added as dependency.
array
- The array of stringsseparator
- The separatorpublic static String checkTrailingSlash(String str)
str
- The URI stringpublic static String removeTrailingSlash(String str)
str
- the URI stringpublic static Boolean isNumeric(String str)
str
- String to compareCopyright © 2018. All rights reserved.