AnsiText.toString

[Not enabled with -betterC] Provides the sink-based version of the autogenerated toString.

This functions and is generated under the same conditions as the parameterless toString, except it supports the sink-based interface certain parts of Phobos recognises, helping to prevent needless allocations.

This function simply wraps the given sink and forwards it to the implementation's toSink function, so there's no implicit GC overhead as with the other toString. (At least, not by AnsiText itself.)

  1. string toString()
  2. void toString(void delegate(const(char)[]) sink)
    struct AnsiText(alias ImplementationMixin)
    static if(Features == AnsiTextImplementationFeatures.basic && !__traits(hasMember, typeof(this), "toString") && !BetterC && __traits(compiles, ))
    void
    toString
    (
    scope void delegate
    (
    const(char)[]
    )
    sink
    )

Meta