3 ms·
> and if you're doing a string-compare for some target value that's already UTF-8, you never need to decode UTF-8 for that field at all Is Go's internal repres
by paulddraper 10y ago
> and if you're doing a string-compare for some target value that's already UTF-8, you never need to decode UTF-8 for that field at all
Is Go's internal representation of the target string UTF-8?
- masklinn 10y ago> Is Go's internal representation of the target string UTF-8? Kinda but kinda not, a Go string is actually an arbitrary bag of bytes, but some API (such as unicode/utf8 or `range` to iterate on codepoints — runes in Go parlance) assume it's proper UTF8.