setLength

expect fun setLength(newLength: Int)(source)

Sets the length of this string builder to the specified newLength.

If the newLength is less than the current length, it is changed to the specified newLength. Otherwise, null characters '\u0000' are appended to this string builder until its length is less than the newLength.

Note that in Kotlin/JS set operator function has non-constant execution time complexity. Therefore, increasing length of this string builder and then updating each character by index may slow down your program.

Since Kotlin

1.4

Throws

actual fun setLength(newLength: Int)(source)

Sets the length of this string builder to the specified newLength.

If the newLength is less than the current length, it is changed to the specified newLength. Otherwise, null characters '\u0000' are appended to this string builder until its length is less than the newLength.

Note that in Kotlin/JS set operator function has non-constant execution time complexity. Therefore, increasing length of this string builder and then updating each character by index may slow down your program.

Since Kotlin

1.4

Throws

actual fun setLength(newLength: Int)(source)

Sets the length of this string builder to the specified newLength.

If the newLength is less than the current length, it is changed to the specified newLength. Otherwise, null characters '\u0000' are appended to this string builder until its length is less than the newLength.

Note that in Kotlin/JS set operator function has non-constant execution time complexity. Therefore, increasing length of this string builder and then updating each character by index may slow down your program.

Since Kotlin

1.3

Throws

actual fun setLength(newLength: Int)(source)

Sets the length of this string builder to the specified newLength.

If the newLength is less than the current length, it is changed to the specified newLength. Otherwise, null characters '\u0000' are appended to this string builder until its length is less than the newLength.

Note that in Kotlin/JS set operator function has non-constant execution time complexity. Therefore, increasing length of this string builder and then updating each character by index may slow down your program.

Since Kotlin

1.8

Throws

actual fun setLength(newLength: Int)(source)

Sets the length of this string builder to the specified newLength.

If the newLength is less than the current length, it is changed to the specified newLength. Otherwise, null characters '\u0000' are appended to this string builder until its length is less than the newLength.

Note that in Kotlin/JS set operator function has non-constant execution time complexity. Therefore, increasing length of this string builder and then updating each character by index may slow down your program.

Since Kotlin

1.8

Throws