# class StringBuf

#### no package

Available on all platforms

A String buffer is an efficient way to build a big string by appending small elements together.

Its cross-platform implementation uses String concatenation internally, but StringBuf may be optimized for different targets.

Unlike String, an instance of StringBuf is not immutable in the sense that it can be passed as argument to functions which modify it by appending more values. However, the internal buffer cannot be modified.

### Constructor

###

`new ()`

Creates a new StringBuf instance.

This may involve initialization of the internal buffer.

### Variables

###

`read onlywrite onlylength:Int`

Available on Android, Flash, HTML5, iOS, Neko

The length of `this` StringBuf in characters.

###

`read onlylength:Int`

Available on Linux, macOS, Windows

The length of `this` StringBuf in characters.

### Methods

###

`toString ():String`

Available on Android, iOS, Linux, macOS, Windows

Returns the content of `this` StringBuf as String.

The buffer is not emptied by this operation.