append

Common
JS
1.0
fun append(value: Char): StringBuilder
Native
1.3
fun append(c: Char): StringBuilder
For Common, JS

Appends the specified character value to this Appendable and returns this instance.

Parameters

value - the character to append.

For Native

Appends the specified character c to this Appendable and returns this instance.

Parameters

c - the character to append.

Common
JS
1.0
fun append(value: CharSequence?): StringBuilder
Native
1.3
fun append(csq: CharSequence?): StringBuilder
For Common, JS

Appends the specified character sequence value to this Appendable and returns this instance.

Parameters

value - the character sequence to append. If value is null, then the four characters "null" are appended to this Appendable.

For Native

Appends the specified character sequence csq to this Appendable and returns this instance.

Parameters

csq - the character sequence to append. If csq is null, then the four characters "null" are appended to this Appendable.

Common
JS
1.0
fun append(
    value: CharSequence?,
    startIndex: Int,
    endIndex: Int
): StringBuilder
Native
1.3
fun append(
    csq: CharSequence?,
    start: Int,
    end: Int
): StringBuilder
For Common, JS

Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.

Parameters

value - the character sequence from which a subsequence is appended. If value is null, then characters are appended as if value contained the four characters "null".

startIndex - the beginning (inclusive) of the subsequence to append.

endIndex - the end (exclusive) of the subsequence to append.

Exceptions

IndexOutOfBoundsException - or IllegalArgumentException when startIndex or endIndex is out of range of the value character sequence indices or when startIndex > endIndex.

For Native

Appends a subsequence of the specified character sequence csq to this Appendable and returns this instance.

Parameters

csq - the character sequence from which a subsequence is appended. If csq is null, then characters are appended as if csq contained the four characters "null".

start - the beginning (inclusive) of the subsequence to append.

end - the end (exclusive) of the subsequence to append.

Exceptions

IndexOutOfBoundsException - or IllegalArgumentException when start or end is out of range of the csq character sequence indices or when start > end.

Common
JS
Native
1.0
fun append(value: Any?): StringBuilder

Appends the string representation of the specified object value to this string builder and returns this instance.

The overall effect is exactly as if the value were converted to a string by the value.toString() method, and then that string was appended to this string builder.

Common
JS
Native
1.3
fun append(value: Boolean): StringBuilder

Appends the string representation of the specified boolean value to this string builder and returns this instance.

The overall effect is exactly as if the value were converted to a string by the value.toString() method, and then that string was appended to this string builder.

Common
JS
1.3
@ExperimentalStdlibApi fun append(
    value: CharArray
): StringBuilder
Native
1.3
fun append(value: CharArray): StringBuilder

Appends characters in the specified character array value to this string builder and returns this instance.

Characters are appended in order, starting at the index 0.

Common
JS
Native
1.3
fun append(value: String): StringBuilder

Appends the specified string value to this string builder and returns this instance.

Native
1.3
fun append(value: Byte): StringBuilder
fun append(value: Short): StringBuilder
fun append(value: Int): StringBuilder
fun append(value: Long): StringBuilder
fun append(value: Float): StringBuilder
fun append(value: Double): StringBuilder