Object StringUtil
-
- All Implemented Interfaces:
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) public class StringUtil
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringUtilINSTANCE
-
Method Summary
Modifier and Type Method Description final static Stringnormalize(String value, Character additionalCharsToReplace)Removes empty spaces and any additional specified characters. final BooleanisDigitsAndSeparatorsOnly(String value, Character separators)Check if the string only contains number and the specified separator characters. -
-
Method Detail
-
normalize
final static String normalize(String value, Character additionalCharsToReplace)
Removes empty spaces and any additional specified characters.
- Parameters:
value- The string to be normalized.additionalCharsToReplace- Additional characters to be removed.- Returns:
The original string normalized to remove specified characters.
-
isDigitsAndSeparatorsOnly
final Boolean isDigitsAndSeparatorsOnly(String value, Character separators)
Check if the string only contains number and the specified separator characters.
- Parameters:
value- The string to be checked.separators- The optional accepted separators.- Returns:
If the string is only numbers and separators.
-
-
-
-