Package org.kigalisim.util
Class UnitStringNormalizer
java.lang.Object
org.kigalisim.util.UnitStringNormalizer
Utility class for normalizing unit strings.
Normalization involves removing all whitespace from unit strings to ensure consistent comparison and processing. This class uses literal string replacement for optimal performance.
-
Method Summary
-
Method Details
-
normalize
Remove all whitespace from a unit string.This method uses literal string replacement to remove spaces, which is significantly faster than regex pattern matching for this simple case.
- Parameters:
unitString- The unit string to normalize- Returns:
- The normalized unit string with all whitespace removed
-