StringBuilder class

A StringBuilder extends StringBuffer. methods like StringBuilder from Java

Inheritance

Constructors

StringBuilder([String content = ''])

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Returns whether the buffer is empty. This is a constant-time operation.
no setterinherited
isNotEmpty bool
Returns whether the buffer is not empty. This is a constant-time operation.
no setterinherited
length int
Returns the length of the content that has been accumulated so far. This is a constant-time operation.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

charAt(int idx) String
clear() → void
Clears the string buffer.
override
codePointAt(int index) int
delete(int start, int end) → void
deleteCharAt(int idx) → void
insert(int offset, Object? obj) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replace(int start, int end, dynamic obj) → void
reverse() → void
setCharAt(int index, dynamic char) → void
setLength(int length) → void
substring(int start, [int? end]) String
toString() String
Returns the contents of buffer as a single string.
inherited
write(Object? object) → void
Writes the string representation of object.
override
writeAll(Iterable objects, [String separator = '']) → void
Writes all objects separated by separator.
override
writeCharCode(int charCode) → void
Adds the string representation of charCode to the buffer.
override
writeln([Object? obj = '']) → void
Writes the string representation of object followed by a newline.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int idx) String
operator []=(int idx, String char) → void