insert

JVM
1.9
fun StringBuilder.insert(
    index: Int,
    value: Byte
): StringBuilder

(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.

JVM
1.9
fun StringBuilder.insert(
    index: Int,
    value: Short
): StringBuilder

(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.