Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's the purpose of the Rune type, I believe. When you iterate over text, it gives you one character at a time, not a fixed number of bytes.


That's iteration by code point, not by grapheme. For example, the grapheme 'ä' may be represented as two code points: an 'a' and a combining diaeresis.

http://en.wikipedia.org/wiki/Code_point

http://en.wikipedia.org/wiki/Grapheme




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: