- All Known Implementing Classes:
DefaultStringNormalizer
public interface StringNormalizer
Translates strings to a reduced char set.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringNormalizerThe singleton.Normalizes a string (phonetically) for use as PDO.normText.Converts special unicode characters (so-called diacrits) to standard ascii.
Supports also special german and northern european "umlauts".
-
Method Details
-
getInstance
The singleton.- Returns:
- the singleton
-
normalize
Normalizes a string (phonetically) for use as PDO.normText.- Parameters:
str- the string to be normalized- Returns:
- the normalized string
-
unDiacrit
Converts special unicode characters (so-called diacrits) to standard ascii.
Supports also special german and northern european "umlauts".- Parameters:
str- the string to be convertedkeepLength- true if the length should be kept, i.e. no Ä to AE, but to A- Returns:
- the converted string
-