Converting from C const(dchar*) to dstring
Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 24 12:16:20 PDT 2014
On Tue, 24 Jun 2014 14:28:58 -0400, Chris Cain <zshazz at gmail.com> wrote:
> 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
>
Right, I forgot about that.
-Steve
More information about the Digitalmars-d-learn
mailing list