Package de.maxbossing.maxapi.UTils
Class StringUTils
java.lang.Object
de.maxbossing.maxapi.UTils.StringUTils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringTranslates ChatColor to vanilla Color Codesstatic String[]Translates ChatColor to vanilla Color CodesTranslates ChatColor to vanilla Color Codesstatic StringfromISO8601(String isoFormat, String separator) Formats a ISO8601-formatted String in a Human-Readable Format with a Specified Separatorstatic StringLinks a list of Strings into one separated by a commastatic StringLinks a list of Strings into one separated by specified StringPrefixes all Strings in a list of Strings with a Stringstatic Stringrainbowlize(String string) Rainbowlizes a String def -> add a color code between every characterrainbowlize(String... strings) Rainbowlizes Stringsstatic Stringrainbowlize(String string, String codes) Rainbowlizes a String with given color codes def -> add a color code between every characterrainbowlize(String codes, String... strings) Rainbowlizes Strings with specified codesrainbowlize(List<String> strings) Rainbowlizes a List of Stringsrainbowlize(List<String> strings, String codes) Rainbowlizes a List of Strings with specified codesstatic StringRepeats a String by the specified amountstatic StringstripColor(String string) Strips all ChatColors from a StringstripColor(String... strings) Strips all ChatColors from StringsstripColor(List<String> strings) Strips all ChatColors from a List of StringsSuffixes all Strings in a list of Strings with a Stringstatic StringtoHHMMSS(int timeInSeconds) Formats Seconds in HH:MM:SS Formatstatic StringtoMMSS(int seconds) Formats Seconds in MM:SS format
-
Constructor Details
-
StringUTils
public StringUTils()
-
-
Method Details
-
format
Translates ChatColor to vanilla Color Codes- Parameters:
string- string- Returns:
- String
-
format
Translates ChatColor to vanilla Color Codes- Parameters:
strings- strings- Returns:
- Array of formatted Strings
-
format
Translates ChatColor to vanilla Color Codes- Parameters:
strings- strings- Returns:
- List of formatted Strings
-
link
Links a list of Strings into one separated by a comma- Parameters:
strings- strings- Returns:
- String
-
link
Links a list of Strings into one separated by specified String- Parameters:
strings- stringsseparator- separator- Returns:
- String
-
prefix
Prefixes all Strings in a list of Strings with a String- Parameters:
strings- stringsprefix- prefix- Returns:
- List of Strings
-
suffix
Suffixes all Strings in a list of Strings with a String- Parameters:
strings- stringssuffix- suffix- Returns:
- List of Strings
-
rainbowlize
Rainbowlizes a String def -> add a color code between every character- Parameters:
string- string- Returns:
- String
-
rainbowlize
Rainbowlizes a String with given color codes def -> add a color code between every character- Parameters:
string- stringcodes- codes- Returns:
- String
-
rainbowlize
Rainbowlizes a List of Strings- Parameters:
strings- strings- Returns:
- List of Strings
-
rainbowlize
Rainbowlizes Strings- Parameters:
strings- strings- Returns:
- List of Strings
-
rainbowlize
Rainbowlizes a List of Strings with specified codes- Parameters:
strings- stringscodes- codes- Returns:
- List of Strings
-
rainbowlize
Rainbowlizes Strings with specified codes- Parameters:
strings- strings- Returns:
- List of Strings
-
repeat
Repeats a String by the specified amount- Parameters:
string- stringcount- count- Returns:
- String
-
stripColor
Strips all ChatColors from a String- Parameters:
string- string- Returns:
-
stripColor
Strips all ChatColors from a List of Strings- Parameters:
strings- strings- Returns:
-
stripColor
Strips all ChatColors from Strings- Parameters:
strings- strings- Returns:
-
toMMSS
Formats Seconds in MM:SS format- Parameters:
seconds- seconds- Returns:
- String
-
toHHMMSS
Formats Seconds in HH:MM:SS Format- Parameters:
timeInSeconds- time in seconds- Returns:
- String
-
fromISO8601
Formats a ISO8601-formatted String in a Human-Readable Format with a Specified Separator- Parameters:
isoFormat- isoformat stringseparator- separator- Returns:
- String
-