insert

Common
JS
Native
1.3
fun insert(index: Int, value: Boolean): StringBuilder
(Common source) (JS source) (Native 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Byte): StringBuilder
(Common source) (JS source) (Native source)

Inserts the string representation of the specified byte 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Short): StringBuilder
(Common source) (JS source) (Native source)

Inserts the string representation of the specified short 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Int): StringBuilder
(Common source) (JS source) (Native source)

Inserts the string representation of the specified int 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Long): StringBuilder
(Common source) (JS source) (Native source)

Inserts the string representation of the specified long 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Float): StringBuilder
(Common source) (JS source) (Native source)

Inserts the string representation of the specified float 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Double): StringBuilder
(Common source) (JS source) (Native source)

Inserts the string representation of the specified double 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Char): StringBuilder
(Common source) (JS source) (Native source)

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

Exceptions

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

Common
JS
Native
1.3

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.

Exceptions

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

Common
JS
Native
1.3

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.

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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: Any?): StringBuilder
(Common source) (JS source) (Native 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.

Exceptions

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

Common
JS
Native
1.3
fun insert(index: Int, value: String?): StringBuilder
(Common source) (JS source) (Native 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.

Exceptions

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