On Tuesday, July 9, 2024 at 3:42:51 PM UTC-4 David Anderson wrote:
I've been going over the spec to clarify finer points of how string vs. []byte behave, In https://go.dev/ref/spec#Conversions, `[]rune(str)` is specified as: "Converting a value of a string type to a slice of runes type yields a slice containing the individual Unicode code points of the string." - Dave The Go runtime implementation of []rune(str): func stringtoslicerune(buf *[tmpStringBufSize]rune, s string) []rune { // ... n = 0 for _, r := range s { a[n] = r n++ } return a } peter -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8e9e0c8e-4ea6-4213-aa41-488df84b67ean%40googlegroups.com.