Package dev.sefiraat.sefilib.string
Class TextUtils
java.lang.Object
dev.sefiraat.sefilib.string.TextUtils
This class contains static methods for dealing with strings.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the EasterEgg list.static StringReturns a random name from the EasterEgg list.static StringtoTitleCase(String string) Converts the given string into one in Title Case.static StringtoTitleCase(String string, boolean delimiterToSpace) Converts the given string into one in Title Case.static StringtoTitleCase(String string, boolean delimiterToSpace, String delimiters) Converts the given string into one in Title Case.
-
Method Details
-
toTitleCase
Converts the given string into one in Title Case.- Parameters:
string- The string to convert.- Returns:
- The string in Title Case.
-
toTitleCase
Converts the given string into one in Title Case.- Parameters:
string- The string to convert.delimiterToSpace- Whether to replace the delimiter with a space.- Returns:
- The string in Title Case.
-
toTitleCase
@Nonnull public static String toTitleCase(@Nonnull String string, boolean delimiterToSpace, @Nonnull String delimiters) Converts the given string into one in Title Case.- Parameters:
string- The string to convert.delimiterToSpace- Whether to replace the delimiter with a space.delimiters- The delimiters to replace.- Returns:
- The string in Title Case.
-
getRandomEggName
Returns a random name from the EasterEgg list.- Returns:
- A random name from the EasterEgg list.
-
getEggNames
Returns the EasterEgg list.- Returns:
- The EasterEgg list.
-