byCodePoint for a range of chars
monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 20 12:59:18 PDT 2014
On Tuesday, 20 May 2014 at 18:06:09 UTC, Justin Whear wrote:
> Foreach on narrow strings automatically decodes, so it's as
> simple as:
>
> // assume UTF-8 encoded
> char[] myData = ...
> foreach (dchar codePoint; myData)
> ...
I think the point of his question is if you have an actual
non-array range of chars, in which case foreach does NOT decode.
It simply iterates.
More information about the Digitalmars-d-learn
mailing list