W3cubDocs

/Kotlin

deleteRange

Platform and version requirements: JS (1.4), Native (1.4)
fun StringBuilder.deleteRange(
    startIndex: Int, 
    endIndex: Int
): StringBuilder
For Common, JS

Removes characters in the specified range from this string builder and returns this instance.

Parameters

startIndex - the beginning (inclusive) of the range to remove.

endIndex - the end (exclusive) of the range to remove.

Exceptions

IndexOutOfBoundsException - or IllegalArgumentException when startIndex is out of range of this string builder indices or when startIndex > endIndex.

For Native

Removes characters in the specified range from this string builder and returns this instance.

Parameters

startIndex - the beginning (inclusive) of the range to remove.

endIndex - the end (exclusive) of the range to remove.

Exceptions

IndexOutOfBoundsException - or IllegalArgumentException when startIndex or endIndex is out of range of this string builder indices or when startIndex > endIndex.

© 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/delete-range.html