Hacker News new | ask | show | jobs
by Ancalagon 1493 days ago
Don't forget: in 45 min, without bugs
1 comments

oh and do it in Go* ... Good F'ing Luck .

Go makes normal string operations tricky due to rune being an alias for int32, ranging a string gives []byte indexes ...

https://go.dev/play/p/33jCwNG6Eu6

It's a bit sucky but you can use the standard library function "utf8.DecodeRuneInString(a)".