Converting from C const(dchar*) to dstring

Chris Cain via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 24 11:28:58 PDT 2014


On Tuesday, 24 June 2014 at 17:59:41 UTC, Steven Schveighoffer 
wrote:
> // assuming 0 terminated
> dstring text = x[0..x.strlen].idup;

strlen is only defined for char, not dchar:
https://github.com/D-Programming-Language/druntime/blob/master/src/core/stdc/string.d#L44



More information about the Digitalmars-d-learn mailing list