3 ms·
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.
by MBCook 13y ago
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.
- pjscott 13y agoThat'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/Code_point http://en.wikipedia.org/wiki/Grapheme http://en.wikipedia.org/wiki/Grapheme