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.

Reply via email to