blob: 4432df57867a5c4b9b8f996e5590f115a1540217 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package util
func NormalizeString(str string) string {
out := []rune{}
for _, r := range str {
if rpl, ok := unicodeConfusables[r]; ok {
for _, v := range rpl {
out = append(out, v)
}
} else {
out = append(out, r)
}
}
return string(out)
}
|