Class UmlautUtil
java.lang.Object
ch.tocco.nice2.toolbox.api.text.UmlautUtil
Provides utility methods for dealing with (German) Umlauts.
See http://de.wikipedia.org/wiki/Umlaut
This is used for fulltext searching. Feel free to refactor n'stuff.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringasciifyGermanExtra(String str) CallsasciifyUmlauts(String)andasciifySharpS(String).static StringasciifySharpS(String str) Note that sharp-s is replaced with 2 lowercase ss.static StringasciifyUmlauts(String str) Converts the german umlauts to germanized 2-char variants.static booleanTells if the string contains at least one German umlaut or sharp s.static booleancontainsSharpS(String str) Note that the new uppercase sharp s is not handled yet.static booleancontainsUmlaut(String str) Tells if the string contains at least one german umlaut.static StringflattenGermanExtra(String str) CallsflattenUmlauts(String)andasciifySharpS(String).static StringflattenUmlauts(String str) Removes the dots on umlauts.
-
Method Details
-
containsUmlaut
Tells if the string contains at least one german umlaut. -
containsSharpS
Note that the new uppercase sharp s is not handled yet.
-
containsGermanExtra
Tells if the string contains at least one German umlaut or sharp s.Note that the new uppercase sharp s is not handled yet.
-
asciifyUmlauts
-
flattenUmlauts
-
asciifySharpS
-
asciifyGermanExtra
CallsasciifyUmlauts(String)andasciifySharpS(String). -
flattenGermanExtra
CallsflattenUmlauts(String)andasciifySharpS(String).
-