Replaces std.utf.toUTFz with a version that uses the stack as long as the required bytes for the output are <= 1k. Longer strings use malloc to create a buffer for the conversion. It is freed at least at the end of the scope.
The source string to convert.
string text = "Hello, world!"; WinApiW(wcharPtr!text);
toWstring
See Implementation
Replaces std.utf.toUTFz with a version that uses the stack as long as the required bytes for the output are <= 1k. Longer strings use malloc to create a buffer for the conversion. It is freed at least at the end of the scope.