insert

expect fun insert(index: Int, value: Boolean): StringBuilder(source)

Inserts the string representation of the specified boolean value into this string builder at the specified index 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 inserted into this string builder at the specified index.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


expect fun insert(index: Int, value: Char): StringBuilder(source)

Inserts the specified character value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


expect fun insert(index: Int, value: CharArray): StringBuilder(source)

Inserts characters in the specified character array value into this string builder at the specified index and returns this instance.

The inserted characters go in same order as in the value character array, starting at index.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


expect fun insert(index: Int, value: CharSequence?): StringBuilder(source)

Inserts characters in the specified character sequence value into this string builder at the specified index and returns this instance.

The inserted characters go in the same order as in the value character sequence, starting at index.

Since Kotlin

1.4

Parameters

index

the position in this string builder to insert at.

value

the character sequence from which characters are inserted. If value is null, then the four characters "null" are inserted.

Throws

if index is less than zero or greater than the length of this string builder.


expect fun insert(index: Int, value: Any?): StringBuilder(source)

Inserts the string representation of the specified object value into this string builder at the specified index 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 inserted into this string builder at the specified index.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


expect fun insert(index: Int, value: String?): StringBuilder(source)

Inserts the string value into this string builder at the specified index and returns this instance.

If value is null, then the four characters "null" are inserted.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.

actual fun insert(index: Int, value: Boolean): StringBuilder(source)

Inserts the string representation of the specified boolean value into this string builder at the specified index 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 inserted into this string builder at the specified index.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: Char): StringBuilder(source)

Inserts the specified character value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: CharArray): StringBuilder(source)

Inserts characters in the specified character array value into this string builder at the specified index and returns this instance.

The inserted characters go in same order as in the value character array, starting at index.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: CharSequence?): StringBuilder(source)

Inserts characters in the specified character sequence value into this string builder at the specified index and returns this instance.

The inserted characters go in the same order as in the value character sequence, starting at index.

Since Kotlin

1.4

Parameters

index

the position in this string builder to insert at.

value

the character sequence from which characters are inserted. If value is null, then the four characters "null" are inserted.

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: Any?): StringBuilder(source)

Inserts the string representation of the specified object value into this string builder at the specified index 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 inserted into this string builder at the specified index.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: String?): StringBuilder(source)

Inserts the string value into this string builder at the specified index and returns this instance.

If value is null, then the four characters "null" are inserted.

Since Kotlin

1.4

Throws

if index is less than zero or greater than the length of this string builder.

fun insert(index: Int, value: Byte): StringBuilder(source)
fun insert(index: Int, value: Short): StringBuilder(source)
fun insert(index: Int, value: Int): StringBuilder(source)
fun insert(index: Int, value: Long): StringBuilder(source)
fun insert(index: Int, value: Float): StringBuilder(source)
fun insert(index: Int, value: Double): StringBuilder(source)

Since Kotlin

1.3

actual fun insert(index: Int, value: Boolean): StringBuilder(source)

Inserts the string representation of the specified boolean value into this string builder at the specified index 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 inserted into this string builder at the specified index.

Since Kotlin

1.3

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: Char): StringBuilder(source)

Inserts the specified character value into this string builder at the specified index and returns this instance.

Since Kotlin

1.3

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: CharArray): StringBuilder(source)

Inserts characters in the specified character array value into this string builder at the specified index and returns this instance.

The inserted characters go in same order as in the value character array, starting at index.

Since Kotlin

1.3

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: CharSequence?): StringBuilder(source)

Inserts characters in the specified character sequence value into this string builder at the specified index and returns this instance.

The inserted characters go in the same order as in the value character sequence, starting at index.

Since Kotlin

1.3

Parameters

index

the position in this string builder to insert at.

value

the character sequence from which characters are inserted. If value is null, then the four characters "null" are inserted.

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: Any?): StringBuilder(source)

Inserts the string representation of the specified object value into this string builder at the specified index 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 inserted into this string builder at the specified index.

Since Kotlin

1.3

Throws

if index is less than zero or greater than the length of this string builder.


actual fun insert(index: Int, value: String?): StringBuilder(source)

Inserts the string value into this string builder at the specified index and returns this instance.

If value is null, then the four characters "null" are inserted.

Since Kotlin

1.3

Throws

if index is less than zero or greater than the length of this string builder.