On Sun, Jun 04, 2017 at 12:45:23AM +0000, Stanislav Blinov via 
Digitalmars-d-learn wrote:
[...]
> No, it shouldn't. char* et al. are not string types in D.
> to!(char*)(string) just doesn't make sense.

If you need to convert between D strings and char*, wchar*, etc., e.g.,
for interfacing with C/C++ APIs, take a look at std.string.toStringz and
std.string.fromStringz.  Do not use casts or std.conv.to because D does
not treat character pointers as string, unlike C/C++.


T

-- 
Leather is waterproof.  Ever see a cow with an umbrella?

Reply via email to