On Saturday, 11 November 2017 at 15:48:59 UTC, Mike Parker wrote:
On Saturday, 11 November 2017 at 15:38:18 UTC, aki wrote:
auto bytes = cast(immutable(ubyte)[])s;

Of course, if you need a mutable array you should dup:

auto bytes = cast(ubyte[])s.dup;

Not only "should" but he "must" otherwise with string literals he'll get a violation access error.

Reply via email to