Uses of Class
eu.svjatoslav.commons.string.String2
Packages that use String2
Package
Description
Provides utility classes for string manipulation and pattern matching.
-
Uses of String2 in eu.svjatoslav.commons.string
Methods in eu.svjatoslav.commons.string that return String2Modifier and TypeMethodDescriptionAppends text at the end of this string.Appends the given string multiple times.String2.appendWithSeparator(String separator, String suffix) Appends text with a separator, only adding the separator if the string is not empty.String2.clear()Clears all characters from this string.String2.enforceLength(int targetLength) Adjusts this string to have exactly the specified length.Inserts text at the beginning of this string.String2.repeat(int count) Repeats the current string content the specified number of times.String2.trimPrefix(int cutAmount) Removes the specified number of characters from the beginning of this string.String2.trimPrefixIfExists(String prefix) Removes the specified prefix if this string starts with it.String2.trimSuffix(int charsToTrim) Removes the specified number of characters from the end of this string.String2.trimSuffixIfExists(String suffix) Removes the specified suffix if this string ends with it.