Class UpperCaseSanitizer
java.lang.Object
io.github.rabinarayanpatra.sanitizer.builtin.UpperCaseSanitizer
- All Implemented Interfaces:
FieldSanitizer<String>
Sanitizer that converts the input string to uppercase using the default
locale.
Useful for normalizing values like country codes, acronyms, or identifiers for consistent comparison or storage.
String input = "abc123";
String sanitized = new UpperCaseSanitizer().sanitize(input); // "ABC123"
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UpperCaseSanitizer
public UpperCaseSanitizer()Default constructor.
-
-
Method Details
-
sanitize
Converts the input string to uppercase.- Specified by:
sanitizein interfaceFieldSanitizer<String>- Parameters:
in- the string to sanitize- Returns:
- the uppercase version of the input, or
nullif input isnull
-