Am 02.01.2011 05:12, schrieb Ellery Newcomer:
are there any other cstring -> dstring functions than to!string(char*) ?

something like to!(char[])(char*)

(the memory allocation bothers me)

You can simply make a slice. Indexing and sclicing works also with c-style pointers in D. Obviously $ is not allowed because bare pointers don't have a length.
poinetr[0 .. strlen(pointer)]
Be sure to not give this array to functions which relies on your char[] to be GC-allocated.

Reply via email to