Sqlite
Paul via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 25 10:49:18 PST 2015
On Sunday, 25 January 2015 at 18:19:47 UTC, Tobias Pankrath wrote:
> Only string literals convert to const(char)*, because only for
> them it is guaranteed that they are null terminated. For
> everything else use toStringz.
So, as a trivial example, is this how it's done?:
string semiC = ";";
const char *sqlStatement = toStringz("CREATE TABLE people(id INT
PRIMARY KEY NOT NULL, surname TEXT NOT NULL)"~semiC);
Seems rather ugly but I guess it's a result of interfacing with
C...
More information about the Digitalmars-d-learn
mailing list