appendRange

fun appendRange(value: CharArray, startIndex: Int, endIndex: Int): StringBuilder(source)

Copies a range of value to the end of this builder.

Later changes to the array do not affect the appended text. An empty range is allowed.

Return

this builder for chained calls.

Parameters

value

source array of UTF-16 code units.

startIndex

first array index to include.

endIndex

exclusive end of the array range.

Throws

if the range is reversed, is outside the array, or the resulting length would exceed Int.MAX_VALUE.