Class StringMgmt
java.lang.Object
com.palmergames.util.StringMgmt
Useful functions related to strings, or arrays of them.
- Version:
- 1.4
- Author:
- Shade (Chris H)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcapitalize(String str) static StringcapitalizeStrings(String string) Capitalizes the beginning of each word, accounting for underscores separating those wordsstatic booleancontainsIgnoreCase(List<String> arr, String str) static booleanisAllUpperCase(@NotNull String string) static booleanisAllUpperCase(@NotNull Collection<String> collection) static Stringstatic Stringstatic Stringjoin(Collection<?> args) static Stringjoin(Collection<?> args, String separator) static Stringstatic StringShortens the string to fit in the specified size with an ellipse "..." at the end.static booleanparseOnOff(String s) static String[]static String[]remFirstArg(String[] arr) static String[]remLastArg(String[] arr) static StringremUnderscore(String str) Replaces underscores with spaces.static Stringstatic String[]static StringtranslateHexColors(String string) static StringtranslateHexColors(String string, Function<String, String> hexFunction) static StringtrimMaxLength(String str, int length) Shortens the string to fit in the specified size.static String
-
Field Details
-
hexPattern
-
hexReplacePattern
-
-
Constructor Details
-
StringMgmt
public StringMgmt()
-
-
Method Details
-
translateHexColors
-
translateHexColors
-
join
-
join
-
join
-
join
-
join
-
repeat
-
remFirstArg
-
remLastArg
-
remArgs
-
subArray
-
trimMaxLength
-
maxLength
-
containsIgnoreCase
-
remUnderscore
-
capitalize
-
capitalizeStrings
-
parseOnOff
-
isAllUpperCase
-
isAllUpperCase
-
addToList
-
wrap
-