W3cubDocs

/Kotlin

copyOfRange

inline fun <T> Array<T>.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): Array<T>
inline fun ByteArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): ByteArray
inline fun ShortArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): ShortArray
inline fun IntArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): IntArray
inline fun LongArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): LongArray
inline fun FloatArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): FloatArray
inline fun DoubleArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): DoubleArray
inline fun BooleanArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): BooleanArray
inline fun CharArray.copyOfRange(
    fromIndex: Int, 
    toIndex: Int
): CharArray

Returns new array which is a copy of range of original array.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/copy-of-range.html