Dart API Referencedart:coreStringBuffer

StringBuffer Interface

The StringBuffer class is useful for concatenating strings efficiently. Only on a call to toString are the strings concatenated to a single String.

Default class

StringBufferImpl

Implemented by

StringBufferImpl

Constructors

Code new StringBuffer([Object content]) #

Creates the string buffer with an initial content.

StringBuffer([Object content]);

Methods

Code StringBuffer add(Object obj) #

Converts obj to a string and adds it to the buffer. Returns this.

StringBuffer add(Object obj);

Code StringBuffer addAll(Collection objects) #

Adds all items in objects to the buffer. Returns this.

StringBuffer addAll(Collection objects);

Code StringBuffer addCharCode(int charCode) #

Adds the string representation of charCode to the buffer. Returns this.

StringBuffer addCharCode(int charCode);

Code StringBuffer clear() #

Clears the string buffer. Returns this.

StringBuffer clear();

Code bool isEmpty() #

Returns whether the buffer is empty.

bool isEmpty();

Code int get length() #

Returns the length of the buffer.

int get length();

Code String toString() #

Returns the contents of buffer as a concatenated string.

String toString();