Text.toString16

Convert to the UniText types. The optional argument dst will be resized as required to house the conversion. To minimize heap allocation during subsequent conversions, apply the following pattern:

Text  string;

wchar[] buffer;
wchar[] result = string.utf16 (buffer);

if (result.length > buffer.length)
    buffer = result;

You can also provide a buffer from the stack, but the output will be moved to the heap if said buffer is not large enough

class Text(T)
final override const
wchar[]
toString16
(
wchar[] dst = null
)

Meta