AnsiText.toString

[Not enabled with -betterC] Provides this AnsiText as a printable string.

If the implementation is a basic implementation (see the documentation for AnsiText); if the implementation doesn't define its own toString, and if we're not compliling under -betterC, then AnsiText will generate this function on behalf of the implementation.

Description: For basic implementations this function will call toSink with an Appender!(char[]) as the sink.

For this default generated implementation of toString, it is a seperate GC-allocated string so is fine for any usage. If an implementation defines its own toString then it should also document what the lifetime of its returned string is.

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

Return Value

Type: string

This AnsiText as a useable string.

Meta