Problems with string literals and etc.c.odbc.sql functions

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Dec 19 06:16:36 PST 2015


On 19.12.2015 14:20, Marc Schütz wrote:
> As this is going to be passed to a C function, it would need to be
> zero-terminated. `.dup` doesn't do this, he'd have to use
> `std.string.toStringz` instead. However, that function returns a
> `immutable(char)*`, which would have to be cast again :-(

Ouch, I totally missed that. Looks like we don't have a nice way to do 
this then?


More information about the Digitalmars-d-learn mailing list