removeRange

fun CharSequence.removeRange(startIndex: Int, endIndex: Int): CharSequence(source)

Returns a char sequence with content of this char sequence where its part at the given range is removed.

Since Kotlin

1.0

Parameters

startIndex

the index of the first character to be removed.

endIndex

the index of the first character after the removed part to keep in the string.

endIndex is not included in the removed part.


inline fun String.removeRange(startIndex: Int, endIndex: Int): String(source)

Removes the part of a string at a given range.

Since Kotlin

1.0

Parameters

startIndex

the index of the first character to be removed.

endIndex

the index of the first character after the removed part to keep in the string.

endIndex is not included in the removed part.


Returns a char sequence with content of this char sequence where its part at the given range is removed.

The end index of the range is included in the removed part.

Since Kotlin

1.0

inline fun String.removeRange(range: IntRange): String(source)

Removes the part of a string at the given range.

The end index of the range is included in the removed part.

Since Kotlin

1.0