V Tue, 09 Feb 2016 12:46:59 +0000
Whirlpool via Digitalmars-d-learn <[email protected]>
napsáno:
> Hello,
>
> When you are using a C function (from an external library) that
> returns a pointer on char which is the beginning of a string (I
> know that C does not have a string type, that they are just
> arrays of chars ended by '\0'), is there a simple way to print
> that string with D's write(f)ln, should I use C's printf, or
> something else ? What is the best way ? Because if I do
> writefln("... %s", *pString);
> it only displays the first character of the string, the value
> that pString points to
>
> Thanks
http://dlang.org/phobos/std_string.html#.fromStringz