Is there an equivalent to toStringz for wide strings?

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Apr 4 16:44:46 PDT 2011


On 4/5/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> Not to mention, in the case above, a null
> character should automatically be appended onto the end of the string, since
> it's as string literal.

I've always found this confusing. So If I have this char array:
char[] foostring = "foo".dup;

null is appended to it? So what happens to the null terminator if I
append another string to foostring? And if I do a copy, e.g.
foostring[0..$], does this still copy a null terminator?


More information about the Digitalmars-d-learn mailing list