How to handle char* to string from C functions?
Gary Willoughby
dev at nomad.so
Thu Jan 2 07:26:49 PST 2014
On Wednesday, 1 January 2014 at 23:09:05 UTC, Adam D. Ruppe wrote:
> On Wednesday, 1 January 2014 at 23:03:06 UTC, Gary Willoughby
> wrote:
>> I'm calling an external C function which returns a string
>> delivered via a char*. When i print this string out, like this:
>>
>> char* result = func();'
>
> you can then do
>
> string r = to!string(result);
>
> or
>
> char[] r = result[0 .. strlen(result)];
>
>
> and use that/
Another question: how do i convert const(char)** to string[]?
More information about the Digitalmars-d-learn
mailing list