Poll: Primary D version

Pelle pelle.mansson at gmail.com
Sat May 22 12:10:17 PDT 2010


On 05/22/2010 08:26 PM, Robert Clipsham wrote:
> extern(C)void someFunc(char*);
>
> There is no function in phobos which will allow me to call this function
> using a D string

You could use (array.dup ~ '\0').ptr, right?

> extern(C)void someFunc(wchar*);
>
> This is impossible with phobos, there's no function to convert a D
> string to wchar*, not even one where I could cast away constness. This
> includes dchar* too.

to!(wchar[])(chararray) works.


More information about the Digitalmars-d mailing list