copyInto

Common
inline fun UIntArray.copyInto(destination: UIntArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): UIntArray
inline fun ULongArray.copyInto(destination: ULongArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): ULongArray
inline fun UByteArray.copyInto(destination: UByteArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): UByteArray
inline fun UShortArray.copyInto(destination: UShortArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): UShortArray
fun <T> Array<out T>.copyInto(destination: Array<T>, destinationOffset: Int, startIndex: Int, endIndex: Int): Array<T>
fun ByteArray.copyInto(destination: ByteArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ByteArray
fun ShortArray.copyInto(destination: ShortArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ShortArray
fun IntArray.copyInto(destination: IntArray, destinationOffset: Int, startIndex: Int, endIndex: Int): IntArray
fun LongArray.copyInto(destination: LongArray, destinationOffset: Int, startIndex: Int, endIndex: Int): LongArray
fun FloatArray.copyInto(destination: FloatArray, destinationOffset: Int, startIndex: Int, endIndex: Int): FloatArray
fun DoubleArray.copyInto(destination: DoubleArray, destinationOffset: Int, startIndex: Int, endIndex: Int): DoubleArray
fun BooleanArray.copyInto(destination: BooleanArray, destinationOffset: Int, startIndex: Int, endIndex: Int): BooleanArray
fun CharArray.copyInto(destination: CharArray, destinationOffset: Int, startIndex: Int, endIndex: Int): CharArray

Copies this array or its subrange into the destination array and returns that array.

It's allowed to pass the same array in the destination and even specify the subrange so that it overlaps with the destination range.

Return

the destination array.

Since Kotlin

1.3

Parameters

destination

the array to copy to.

destinationOffset

the position in the destination array to copy to, 0 by default.

startIndex

the beginning (inclusive) of the subrange to copy, 0 by default.

endIndex

the end (exclusive) of the subrange to copy, size of this array by default.

Throws

when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.

fun <T> Array<out T>.copyInto(destination: Array<T>, destinationOffset: Int, startIndex: Int, endIndex: Int): Array<T>
fun ByteArray.copyInto(destination: ByteArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ByteArray
fun ShortArray.copyInto(destination: ShortArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ShortArray
fun IntArray.copyInto(destination: IntArray, destinationOffset: Int, startIndex: Int, endIndex: Int): IntArray
fun LongArray.copyInto(destination: LongArray, destinationOffset: Int, startIndex: Int, endIndex: Int): LongArray
fun FloatArray.copyInto(destination: FloatArray, destinationOffset: Int, startIndex: Int, endIndex: Int): FloatArray
fun DoubleArray.copyInto(destination: DoubleArray, destinationOffset: Int, startIndex: Int, endIndex: Int): DoubleArray
fun BooleanArray.copyInto(destination: BooleanArray, destinationOffset: Int, startIndex: Int, endIndex: Int): BooleanArray
fun CharArray.copyInto(destination: CharArray, destinationOffset: Int, startIndex: Int, endIndex: Int): CharArray

Copies this array or its subrange into the destination array and returns that array.

It's allowed to pass the same array in the destination and even specify the subrange so that it overlaps with the destination range.

Return

the destination array.

Since Kotlin

1.3

Parameters

destination

the array to copy to.

destinationOffset

the position in the destination array to copy to, 0 by default.

startIndex

the beginning (inclusive) of the subrange to copy, 0 by default.

endIndex

the end (exclusive) of the subrange to copy, size of this array by default.

Throws

when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.

JS
inline fun <T> Array<out T>.copyInto(destination: Array<T>, destinationOffset: Int, startIndex: Int, endIndex: Int): Array<T>
inline fun ByteArray.copyInto(destination: ByteArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ByteArray
inline fun ShortArray.copyInto(destination: ShortArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ShortArray
inline fun IntArray.copyInto(destination: IntArray, destinationOffset: Int, startIndex: Int, endIndex: Int): IntArray
inline fun LongArray.copyInto(destination: LongArray, destinationOffset: Int, startIndex: Int, endIndex: Int): LongArray
inline fun FloatArray.copyInto(destination: FloatArray, destinationOffset: Int, startIndex: Int, endIndex: Int): FloatArray
inline fun DoubleArray.copyInto(destination: DoubleArray, destinationOffset: Int, startIndex: Int, endIndex: Int): DoubleArray
inline fun BooleanArray.copyInto(destination: BooleanArray, destinationOffset: Int, startIndex: Int, endIndex: Int): BooleanArray
inline fun CharArray.copyInto(destination: CharArray, destinationOffset: Int, startIndex: Int, endIndex: Int): CharArray

Copies this array or its subrange into the destination array and returns that array.

It's allowed to pass the same array in the destination and even specify the subrange so that it overlaps with the destination range.

Return

the destination array.

Since Kotlin

1.3

Parameters

destination

the array to copy to.

destinationOffset

the position in the destination array to copy to, 0 by default.

startIndex

the beginning (inclusive) of the subrange to copy, 0 by default.

endIndex

the end (exclusive) of the subrange to copy, size of this array by default.

Throws

when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.

Native
fun <T> Array<out T>.copyInto(destination: Array<T>, destinationOffset: Int, startIndex: Int, endIndex: Int): Array<T>
fun ByteArray.copyInto(destination: ByteArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ByteArray
fun ShortArray.copyInto(destination: ShortArray, destinationOffset: Int, startIndex: Int, endIndex: Int): ShortArray
fun IntArray.copyInto(destination: IntArray, destinationOffset: Int, startIndex: Int, endIndex: Int): IntArray
fun LongArray.copyInto(destination: LongArray, destinationOffset: Int, startIndex: Int, endIndex: Int): LongArray
fun FloatArray.copyInto(destination: FloatArray, destinationOffset: Int, startIndex: Int, endIndex: Int): FloatArray
fun DoubleArray.copyInto(destination: DoubleArray, destinationOffset: Int, startIndex: Int, endIndex: Int): DoubleArray
fun BooleanArray.copyInto(destination: BooleanArray, destinationOffset: Int, startIndex: Int, endIndex: Int): BooleanArray
fun CharArray.copyInto(destination: CharArray, destinationOffset: Int, startIndex: Int, endIndex: Int): CharArray

Copies this array or its subrange into the destination array and returns that array.

It's allowed to pass the same array in the destination and even specify the subrange so that it overlaps with the destination range.

Return

the destination array.

Since Kotlin

1.3

Parameters

destination

the array to copy to.

destinationOffset

the position in the destination array to copy to, 0 by default.

startIndex

the beginning (inclusive) of the subrange to copy, 0 by default.

endIndex

the end (exclusive) of the subrange to copy, size of this array by default.

Throws

when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.