public final class StringUtilities extends Object
Constructor and Description |
---|
StringUtilities() |
Modifier and Type | Method and Description |
---|---|
static String |
cleanUp(String s)
Strips all characters from a String, that might be invalid to be used in file names.
|
static boolean |
convertToBoolean(String resultString)
Converts a Last.fm boolean result string to a boolean.
|
static String |
decode(String s) |
static String |
encode(String s) |
static boolean |
isMbid(String nameOrMbid) |
static boolean |
isMD5(String s)
Tests if the given string might already be a 32-char md5 string.
|
static Map<String,String> |
map(String... strings)
Creates a Map out of an array with Strings.
|
static String |
md5(String s) |
public static boolean isMbid(String nameOrMbid)
public static Map<String,String> map(String... strings)
strings
- input strings, key-value alternatingpublic static String cleanUp(String s)
s
- the String to clean uppublic static boolean isMD5(String s)
s
- String to testtrue
if the given String might be a md5 stringpublic static boolean convertToBoolean(String resultString)
resultString
- A Last.fm boolean result string.true
if the given String represents a true, false
otherwise.