Text.toString

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

  1. string toString()
    class Text(T)
    override const
    string
    toString
    ()
  2. char[] toString(char[] dst)

Meta