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...
  • Sqlite Paul via Digitalmars-d-learn
    • Re: Sqlite ketmar via Digitalmars-d-learn
    • Re: Sqlite Paul via Digitalmars-d-learn
      • Re: Sqlite Tobias Pankrath via Digitalmars-d-learn
        • Re: Sqlite Paul via Digitalmars-d-learn
          • Re: Sqlite Paul via Digitalmars-d-learn
            • Re: Sqlite Tobias Pankrath via Digitalmars-d-learn
              • Re: Sqli... Paul via Digitalmars-d-learn

Reply via email to