copyOfSubArray

fun copyOfSubArray(array: ByteArray, from: Int, to: Int): ByteArray
fun copyOfSubArray(array: CharArray, from: Int, to: Int): CharArray
fun copyOfSubArray(array: ShortArray, from: Int, to: Int): ShortArray
fun copyOfSubArray(array: IntArray, from: Int, to: Int): IntArray
fun copyOfSubArray(array: LongArray, from: Int, to: Int): LongArray
fun copyOfSubArray(array: FloatArray, from: Int, to: Int): FloatArray
fun copyOfSubArray(array: DoubleArray, from: Int, to: Int): DoubleArray
inline fun <T> copyOfSubArray(array: Array<T>, from: Int, to: Int): Array<T>

Copies the specified range of the given array into a new sub array.

Parameters

array

the input array

from

the initial index of range to be copied (inclusive)

to

the final index of range to be copied (exclusive)