Descriptiongo.text/transform: added RemoveFunc transform for removing individual
runes from the input. This corresponds to ICU's Remove transform.
For example, to remove accents from characters one could use RemoveFunc
as follows:
nonspacingMark := func(r rune) bool {
return unicode.Is(unicode.Mn, r)
}
transform.Chain(norm.NFD, transform.RemoveFunc(nonspacingMark), norm.NFC)
(Once norm.Form implements Transformer; guess what will be my next CL.)
Patch Set 1 #Patch Set 2 : diff -r aa889cffaf58 https://code.google.com/p/go.text #Patch Set 3 : diff -r aa889cffaf58 https://code.google.com/p/go.text #
Total comments: 2
Patch Set 4 : diff -r 8526923b4c51 https://code.google.com/p/go.text #
MessagesTotal messages: 5
|