On 3/9/14, 5:28 AM, Joseph Rushton Wakeling wrote:
On 09/03/14 04:26, Andrei Alexandrescu wrote:
2. Add byChar that returns a random-access range iterating a string by
character. Add byWchar that does on-the-fly transcoding to UTF16. Add
byDchar that accepts any range of char and does decoding. And such
stuff. Then whenever one wants to go through a string by code point
can just use str.byChar.
This is confusing. Did you mean to say that byChar iterates a string by
code unit (not character / code point)?
Unit. s.byChar.front is a (possibly ref, possibly qualified) char.
So IIUC iterating over s.byChar would not encounter the decoding-related
speed hits that Walter is concerned about?
That is correct.
Andrei