Package org.pentaho.platform.util
Class StringUtil
java.lang.Object
org.pentaho.platform.util.StringUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Does the path contain a path-segment that is "..".static String
getMapAsPrettyString
(Map map) Returns the providedMap
as a pretty string, using the system dependent new like character as the key-value pair separator, and ' -> ' as the individual key and value separator.static boolean
static void
static String[]
tokenStringToArray
(String tokenizedString, String token) Tokenize a string and return a String Array of the values seperated by the passed in token.trimStringList
(List<String> list) Returns a List of Strings in which each String has been trimmed of whitespace.trimStringMap
(Map<String, String> map) Returns a map of String key-value pairs, in which each key and corresponding value has been trimmed of whitespace.static String
trimToEmpty
(String string) Wrapper method around StringUtils.trim
-
Method Details
-
tokenStringToArray
Tokenize a string and return a String Array of the values seperated by the passed in token.- Parameters:
tokenizedString
- The string to parse. If this is null, null will be returned.token
- The token used as a seperator. if this is null, the fill string will be returned in a 1 element array- Returns:
- Array of Strings that were seperated by the token.
-
doesPathContainParentPathSegment
Does the path contain a path-segment that is "..".- Parameters:
path
- String- Returns:
- boolean return true if path contains "..", else false.
-
main
-
isEmpty
-
getMapAsPrettyString
Returns the providedMap
as a pretty string, using the system dependent new like character as the key-value pair separator, and ' -> ' as the individual key and value separator. -
trimStringMap
Returns a map of String key-value pairs, in which each key and corresponding value has been trimmed of whitespace. -
trimStringList
Returns a List of Strings in which each String has been trimmed of whitespace. -
trimToEmpty
Wrapper method around StringUtils.trim
-