How can I find unicode codepoints in Go?
This may help: utf8 package - unicode/utf8 - Go Packages
package main
import (
"fmt"
"unicode/utf8"
)
func main() {
str := "Hello, 世界"
for len(str) > 0 {
r, size := utf8.DecodeLastRuneInString(str)
fmt.Printf("%c %v\n", r, size)
str = str[:len(str)-size]
}
}
Great! thanks for your help