Good day,

Is it possible somehow to convert implicitly a string literal into an ubyte array?
For example:

void do(immutable(ubyte)[] asciiString) {
// Do something with ascii string.
}

And from another section of code, calling it like:

do("Some ascii string");
-----------

If no, is there an us-ascii string literal that consists of ubytes and not chars?

It's just in some of my code should work only with ascii strings, and it will be cumbersome to convert to ubyte array a string literal each time a function accepting an ubyte array is called.

Thank you.

Reply via email to