Package de.kosmos_lab.utils
Class StringFunctions
java.lang.Object
de.kosmos_lab.utils.StringFunctions
public class StringFunctions extends Object
-
Constructor Summary
Constructors Constructor Description StringFunctions() -
Method Summary
Modifier and Type Method Description static Stringdecompose(String s)static StringfilterFilename(String input)static StringfilterName(String input)removes anything from the text that is not alphanumericstatic StringgenerateRandomKey()Generate random key.static StringgenerateRandomKey(int len)Generate random key.static HashSet<String>getListOfString(LinkedList<HashSet<String>> wordList)static StringreplaceEverythingButNumbers(String text)static StringtoCamelCase(String input)camelcases the input, ie "to camel case" will yield "toCamelCase"static Stringtrim(String input)trims away space and comma at the beginning and end and also removes double spacingstatic Stringtrim(String input, char[] chrs)trims away any given characters, also removes double spacesstatic StringtrimDoubleSpaces(String input)trims away double spaces
-
Constructor Details
-
StringFunctions
public StringFunctions()
-
-
Method Details
-
decompose
-
filterFilename
-
filterName
removes anything from the text that is not alphanumeric- Parameters:
input- any inputtext- Returns:
- the text with everything but Alphanumerics and spaces stripped
-
generateRandomKey
Generate random key.- Returns:
- the string
-
generateRandomKey
Generate random key.- Returns:
- the string
-
getListOfString
-
replaceEverythingButNumbers
-
toCamelCase
camelcases the input, ie "to camel case" will yield "toCamelCase"- Parameters:
input- the string to camelcase- Returns:
- the camelcased string
-
trim
trims away space and comma at the beginning and end and also removes double spacing- Parameters:
input- the input to trim- Returns:
- the trimmed input
-
trim
trims away any given characters, also removes double spaces- Parameters:
input- the inputchrs- the array of characters to remove- Returns:
- the trimmed input
-
trimDoubleSpaces
trims away double spaces- Parameters:
input- the input to trim- Returns:
- the trimmed string
-