Source string. Must be validly encoded. This is enforced by the function's in-contract.
Destination string
wstring ws; // transcode from UTF-8 to UTF-16 transcode("hello world",ws); assert(ws == "hello world"w); Latin1String ls; // transcode from UTF-16 to ISO-8859-1 transcode(ws, ls); assert(ls == "hello world");
Unicode 5.0, ASCII, ISO-8859-1, ISO-8859-2, WINDOWS-1250, WINDOWS-1251, WINDOWS-1252
Convert a string from one encoding to another.
Supersedes: This function supersedes std.utf.toUTF8(), std.utf.toUTF16() and std.utf.toUTF32() (but note that to!() supersedes it more conveniently).