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.
shared Integer size
Returns the size of the current content.
shared actual String string
The resulting string. If no characters have been appended, the empty string.
|Attributes inherited from: Object|
Append the characters in the given string.
Append the characters in the given strings.
Append the given character.
shared StringBuilder appendNewline()
Append a newline character.
shared StringBuilder appendSpace()
Append a space character.
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.
Insert a String or 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.
shared StringBuilder reset()
Remove all content and return to initial state.
|Methods inherited from: Object|