IndentedStringBuffer class final
- Inheritance
-
- Object
- StringBuffer
- IndentedStringBuffer
- Available extensions
Constructors
- IndentedStringBuffer.new({Object content = "", String indent = ""})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- indent ↔ String
-
The indent, that is used by the various
write*Indented()
methods.getter/setter pair - 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
-
clear(
) → void -
Clears the string buffer.
inherited
-
getConsumer(
{Encoding encoding = CliTool.defaultCliEncoding}) → StringConsumer -
Available on StringSink, provided by the StringSinkToConsumerExtension extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the contents of buffer as a single string.
inherited
-
write(
Object? object) → void -
Writes the string representation of
object
.inherited -
writeAll(
Iterable objects, [String separator = ""]) → void -
Writes the elements of
objects
separated byseparator
.inherited -
writeAllIndented(
Iterable objects, [String separator = "", int indentFactor = 1]) → void -
Same as writeAll, but prepends indent to every value from
objects
. -
writeCharCode(
int charCode) → void -
Writes a string containing the character with code point
charCode
.inherited -
writeCharCodeIndented(
int charCode, [int indentFactor = 1]) → void - Same as writeCharCode, but prepends indent to the character.
-
writeIndented(
Object? object, [int indentFactor = 1]) → void -
Same as write, but prepends indent to
object
. -
writeln(
[Object? obj = ""]) → void -
Writes the string representation of
object
followed by a newline.inherited -
writelnIndented(
[Object? object = "", int indentFactor = 1]) → void -
Same as writeln, but prepends indent to
object
. -
writeSpace(
) → void -
Available on StringBuffer, provided by the StringBufferWriteSpaceExtension extension
Add a space to the buffer.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited