remarks StringBuilder is the default implementation of this contract.
 *
 *  public export interface IStringBuilder { /**
     * Append the specified text to the buffer.
     */ append ( text ) : void ; remarks toString ( ) : string ; } remarks public export class StringBuilder implements IStringBuilder { private _chunks : string [ ] ; public constructor ( ) { this . _chunks = [ ] ; } /** {@inheritDoc IStringBuilder.append} */ public append ( text ) { this . _chunks . push ( text ) ; } /** {@inheritDoc IStringBuilder.toString} */ public toString ( ) { if ( this . _chunks . length === 0 ) { return '' ; } if ( this . _chunks . length > 1 ) { const joined = this . _chunks . join ( '' ) ; this . _chunks . length = 1 ; this . _chunks [ 0 ] = joined ; } return this . _chunks [ 0 ] ; } }