Comment on Strings, bytes, runes and characters in GoparentComments−elithrar12yGo also has utf8.RuneCount([]byte) and utf8.RuneCountInString(string), which return the number of runes: http://golang.org/pkg/unicode/utf8/#RuneCount(check the docs, there's also RuneStart, which returns true/false if you index mid-rune)
Comments
Go also has utf8.RuneCount([]byte) and utf8.RuneCountInString(string), which return the number of runes: http://golang.org/pkg/unicode/utf8/#RuneCount
(check the docs, there's also RuneStart, which returns true/false if you index mid-rune)