StringBuilder.withContent constructor
StringBuilder.withContent(
- String initialContent
Creates a StringBuilder with initial content.
initialContent
the initial string content
A mutable sequence of characters similar to Java's StringBuilder.
This class provides an efficient way to build strings by appending characters, strings, and other data types.
Example usage:
StringBuilder sb = StringBuilder();
sb.append("Hello");
sb.append(" ");
sb.append("World");
sb.append("!");
print(sb.toString()); // "Hello World!"
print(sb.length()); // 12
Implementation
StringBuilder.withContent(String initialContent) : _buffer = StringBuffer(initialContent);