On Apr 29, 11 17:53, lenochware wrote:
== Quote from Denis Koroskin ([email protected])'s article

You can use import("file.txt"); to import files (text or binary) at
compile time.

Interesting - I didn't know this. It's true that most of strings will be 
probably
loaded from some file in final application...

You could use x"" string, or just escape those characters

    auto x = x"f1f2f3 f4";
    auto y = "\xf1\xf2\xf3\xf4";

(And if your "string" is not a UTF-8 string at all, you should use a ubyte[], not char[].

    const(ubyte)[] z = [0xf1, 0xf2, 0xf3, 0xf4];
    auto t = cast(const(ubyte)[]) x"f1f2f3f4";

)

Reply via email to