slice

Common
JVM
JS
Native
1.0
fun <T> Array<out T>.slice(indices: IntRange): List<T>
(source)
fun ByteArray.slice(indices: IntRange): List<Byte>
(source)
fun ShortArray.slice(indices: IntRange): List<Short>
(source)
fun IntArray.slice(indices: IntRange): List<Int>
(source)
fun LongArray.slice(indices: IntRange): List<Long>
(source)
fun FloatArray.slice(indices: IntRange): List<Float>
(source)
fun DoubleArray.slice(indices: IntRange): List<Double>
(source)
fun BooleanArray.slice(indices: IntRange): List<Boolean>
(source)
fun CharArray.slice(indices: IntRange): List<Char>
(source)
fun <T> List<T>.slice(indices: IntRange): List<T>
(source)
@ExperimentalUnsignedTypes fun UIntArray.slice(
    indices: IntRange
): List<UInt>

(source)
@ExperimentalUnsignedTypes fun ULongArray.slice(
    indices: IntRange
): List<ULong>

(source)
@ExperimentalUnsignedTypes fun UByteArray.slice(
    indices: IntRange
): List<UByte>

(source)
@ExperimentalUnsignedTypes fun UShortArray.slice(
    indices: IntRange
): List<UShort>

(source)

Returns a list containing elements at indices in the specified indices range.

Common
JVM
JS
Native
1.0
fun <T> Array<out T>.slice(indices: Iterable<Int>): List<T>
(source)
fun ByteArray.slice(indices: Iterable<Int>): List<Byte>
(source)
fun ShortArray.slice(indices: Iterable<Int>): List<Short>
(source)
fun IntArray.slice(indices: Iterable<Int>): List<Int>
(source)
fun LongArray.slice(indices: Iterable<Int>): List<Long>
(source)
fun FloatArray.slice(indices: Iterable<Int>): List<Float>
(source)
fun DoubleArray.slice(indices: Iterable<Int>): List<Double>
(source)
fun BooleanArray.slice(indices: Iterable<Int>): List<Boolean>
(source)
fun CharArray.slice(indices: Iterable<Int>): List<Char>
(source)
fun <T> List<T>.slice(indices: Iterable<Int>): List<T>
(source)
@ExperimentalUnsignedTypes fun UIntArray.slice(
    indices: Iterable<Int>
): List<UInt>

(source)
@ExperimentalUnsignedTypes fun ULongArray.slice(
    indices: Iterable<Int>
): List<ULong>

(source)
@ExperimentalUnsignedTypes fun UByteArray.slice(
    indices: Iterable<Int>
): List<UByte>

(source)
@ExperimentalUnsignedTypes fun UShortArray.slice(
    indices: Iterable<Int>
): List<UShort>

(source)

Returns a list containing elements at specified indices.