W3cubDocs

/Kotlin

deleteRange

Platform and version requirements: JVM (1.4)
fun StringBuilder.deleteRange(
    startIndex: Int, 
    endIndex: Int
): StringBuilder

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.

© 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/java.lang.-string-builder/delete-range.html