fun StringBuilder.insert(index: Int, c: Char): StringBuilderDeprecated: Use insert(index: Int, value: Char) instead
fun StringBuilder.insert( index: Int, chars: CharArray ): StringBuilderDeprecated: Use insert(index: Int, value: CharArray) instead
fun StringBuilder.insert( index: Int, csq: CharSequence? ): StringBuilderDeprecated: Use insert(index: Int, value: CharSequence?) instead
fun StringBuilder.insert( index: Int, string: String ): StringBuilderDeprecated: Use insert(index: Int, value: String) instead
fun StringBuilder.insert( index: Int, csq: CharSequence?, start: Int, end: Int ): StringBuilderDeprecated: Use insertRange(index: Int, csq: CharSequence, start: Int, end: Int) instead
Inserts characters in a subsequence of the specified character sequence csq into this string builder at the specified index and returns this instance.
The inserted characters go in the same order as in the csq character sequence, starting at index.
index
- the position in this string builder to insert at.
csq
- the character sequence from which a subsequence is inserted. If csq is null
, then characters will be inserted as if csq contained the four characters "null"
.
start
- the beginning (inclusive) of the subsequence to insert.
end
- the end (exclusive) of the subsequence to insert.
IndexOutOfBoundsException
- or IllegalArgumentException when start or end is out of range of the csq character sequence indices or when start > end
.
IndexOutOfBoundsException
- if index is less than zero or greater than the length of this string builder.
© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/insert.html