aboutsummaryrefslogtreecommitdiff
path: root/util/unicode.go
diff options
context:
space:
mode:
authorrtz12 <koenig@fagott.pw>2016-11-15 17:29:02 (UTC)
committerrtz12 <koenig@fagott.pw>2016-11-15 17:29:02 (UTC)
commit0ad174d7329e02b3f644614de0758789bb3677d4 (patch)
treee49a659c0b89bdec07cde778850b7fe002ac27ea /util/unicode.go
parente02ad854383265db216ed92b10c4f12408999d6a (diff)
Verrückter Anilist Import
Bestes Feature 2k16. Hashtag Make Grilist Great Again.
Diffstat (limited to 'util/unicode.go')
-rw-r--r--util/unicode.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/util/unicode.go b/util/unicode.go
new file mode 100644
index 0000000..4432df5
--- /dev/null
+++ b/util/unicode.go
@@ -0,0 +1,15 @@
1package util
2
3func NormalizeString(str string) string {
4 out := []rune{}
5 for _, r := range str {
6 if rpl, ok := unicodeConfusables[r]; ok {
7 for _, v := range rpl {
8 out = append(out, v)
9 }
10 } else {
11 out = append(out, r)
12 }
13 }
14 return string(out)
15}