On Iteration
Phil Deets
pjdeets2 at gmail.com
Tue Nov 10 11:34:43 PST 2009
On Tue, 10 Nov 2009 05:18:59 -0500, Lutger <lutger.blijdestijn at gmail.com>
wrote:
> - why is a UTF-string iterator bidirectional and why is that unexpected?
I think it is wouldn't support random access since accessing the nth code
point (code points are similar to characters) is not a constant time
operation since different code points can be made up of different numbers
of bytes. That isn't necessarily intuitive since UTF-strings are stored
contiguously in memory; so you might expect them to be random-accessible.
More information about the Digitalmars-d
mailing list