Since strings are immutable, this class is used for constructing a string by incrementally appending characters to the empty string. This class is mutable but threadsafe.

Initializer
StringBuilder()
Attributes
sizeSource Code
shared Integer size

Returns the size of the current content.

stringSource Code
shared actual String string

The resulting string. If no characters have been appended, the empty string.

Refined declaration: string
Inherited Attributes
Attributes inherited from: Object
Methods
appendSource Code
shared StringBuilder append(String string)

Append the characters in the given string.

appendAllSource Code

Append the characters in the given strings.

appendCharacterSource Code
shared StringBuilder appendCharacter(Character character)

Append the given character.

appendNewlineSource Code
shared StringBuilder appendNewline()

Append a newline character.

appendSpaceSource Code
shared StringBuilder appendSpace()

Append a space character.

deleteSource Code
shared StringBuilder delete(Integer index, Integer length)

Deletes the specified number of characters from the current content, starting at the specified position. If the position is beyond the end of the current content, nothing is deleted. If the number of characters to delete is greater than the available characters from the given position, the content is truncated at the given position.

insertSource Code
shared StringBuilder insert(Integer index, String string)

Insert a String at the specified position. If the position is beyond the end of the current string,

the new content is simply appended to the current 
content. If the position is a negative number, the 
new content is inserted at index 0.
insertCharacterSource Code
shared StringBuilder insertCharacter(Integer index, Character character)

Insert a Character at the specified position. If the position is beyond the end of the current string, the new content is simply appended to the current content. If the position is a negative number, the new content is inserted at index 0.

resetSource Code
shared StringBuilder reset()

Remove all content and return to initial state.

Inherited Methods
Methods inherited from: Object