append
Appends one UTF-16 code unit, growing the buffer if needed.
Return
this builder for chained calls.
Parameters
code unit to append.
Throws
if the resulting length would exceed Int.MAX_VALUE.
Copies all code units from value to the end of this builder.
Appending this builder to itself copies its original content once.
Return
this builder for chained calls.
Parameters
text to append; null appends the four characters null.
Throws
if the resulting length would exceed Int.MAX_VALUE.
Copies a range of value to the end of this builder.
When value is null, the range selects from the four-character string null. Self-append reads the selected original range before changing length.
Return
this builder for chained calls.
Parameters
source text, or null to use null as the source.
first source UTF-16 code unit to include.
exclusive end of the source range; may equal startIndex.
Throws
if the range is reversed, is outside the source, or the resulting length would exceed Int.MAX_VALUE.
Copies all code units from value to the end of this builder.
Later changes to the array do not affect the appended text.
Return
this builder for chained calls.
Parameters
source array of UTF-16 code units.
Throws
if the resulting length would exceed Int.MAX_VALUE.
Converts value to text and appends that text.
A non-null value uses its toString() implementation; exceptions from that conversion propagate to the caller. Null appends the four characters null.
Return
this builder for chained calls.
Parameters
object to convert and append.
Throws
if the resulting length would exceed Int.MAX_VALUE.