slice

Common
JVM
JS
Native
1.0

Returns a char sequence containing characters of the original char sequence at the specified range of indices.

Common
JVM
JS
Native
1.0
fun String.slice(indices: IntRange): String
(source)

Returns a string containing characters of the original string at the specified range of indices.

Common
JVM
JS
Native
1.0
fun CharSequence.slice(indices: Iterable<Int>): CharSequence
(source)

Returns a char sequence containing characters of the original char sequence at specified indices.

Common
JVM
JS
Native
1.0
fun String.slice(indices: Iterable<Int>): String
(source)

Returns a string containing characters of the original string at specified indices.