copyOfRange

abstract fun <T> copyOfRange(original: Array<T>, fromIndex: Int, toIndex: Int): Array<T>

复制数组的指定范围.

Return

包含指定范围元素的新数组

Parameters

T

数组元素类型

original

原数组

fromIndex

起始索引(包含)

toIndex

结束索引(不包含)