Hitchikers Guide to Porting Phobos / D Runtime to other architectures

Adam D. Ruppe destructionator at gmail.com
Wed Jan 8 07:59:25 PST 2014


On Wednesday, 8 January 2014 at 15:21:21 UTC, Johannes Pfau wrote:
> But IIRC druntime does some UTF normalization or something on 
> strings or was that only for foreach over strings?

No, all it does is if you ask for foreach(dchar c; string){}, it 
will decode the multi-byte sequences. This does not require 
druntime, the compiler just outputs the code for it.

Decoding the multi byte sequences isn't much code, it is just 
some loads, shifts, and bit masks. Fairly lightweight.


More information about the Digitalmars-d mailing list