3 ms·
Thanks for the explanation. I guess I'm in the habit of thinking of a string as a list of characters. :)
by RyanMcGreal 17y ago
Thanks for the explanation. I guess I'm in the habit of thinking of a string as a list of characters. :)
- masak 17y agoHah, then I grok your initial reaction better. :) There is actually a class in Perl 6, called Buf, for when you want to talk about a sequence of bytes rather than a sequence of characters/graphemes. Buf is array-indexable; in fact it works a little like a string a little like an array. It's there to make it harder to screw encodings up. See http://use.perl.org/~masak/journal/39236 http://use.perl.org/~masak/journal/39236 for how.