Base64 of String without casting
tcak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 1 02:31:51 PDT 2016
I understand that Base64 uses Ranges, and since String is seen
and used as unicode by Ranges (please tell me if I am wrong).
I am guessing, for this reason, auto btoa =
std.base64.Base64.encode("Blah"); doesn't work. You need to be
casting the string to ubyte[] to make it work which doesn't look
and feel nice at all.
Can/shall we add another alias into the module for encode method,
so it accepts a string, and casts it to ubyte[] by itself?
More information about the Digitalmars-d-learn
mailing list