2,875
edits
mNo edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
=== Constructor === | === Constructor === | ||
====StringBuilder.new()==== | |||
Creates a new `StringBuilder` object. | Creates a new `StringBuilder` object. | ||
Line 13: | Line 13: | ||
=== Methods === | === Methods === | ||
====StringBuilder:append(...)==== | |||
Appends strings or values to the `StringBuilder` buffer. | Appends strings or values to the `StringBuilder` buffer. | ||
Line 20: | Line 20: | ||
* `...`: One or more values to append to the buffer. | * `...`: One or more values to append to the buffer. | ||
====StringBuilder:appendLine(...)==== | |||
Appends strings or values followed by a newline (`\n`) to the `StringBuilder` buffer. | Appends strings or values followed by a newline (`\n`) to the `StringBuilder` buffer. | ||
Line 27: | Line 27: | ||
* `...`: One or more values to append to the buffer. | * `...`: One or more values to append to the buffer. | ||
====StringBuilder:clear()==== | |||
Clears the contents of the `StringBuilder` buffer. | Clears the contents of the `StringBuilder` buffer. | ||
Line 33: | Line 33: | ||
* '''Usage:''' Call this method to reset the `StringBuilder` buffer to an empty state. | * '''Usage:''' Call this method to reset the `StringBuilder` buffer to an empty state. | ||
====StringBuilder:toString()==== | |||
Converts the `StringBuilder` buffer into a concatenated string. | Converts the `StringBuilder` buffer into a concatenated string. |
edits