Spec-Zone.ru › Kotlin 2

copyInto

kotlin-stdlib/kotlin.collections/copyInto

Требования к платформе и версии: Common (1.3)

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

Копирует этот массив или его часть в массив назначения и возвращает этот массив.

Можно передать тот же массив в качестве массива назначения и даже указать часть, перекрывающую диапазон назначения.

Возвращает

массив назначения.

Параметры

destination

массив, в который выполняется копирование.

destinationOffset

позиция в массиве назначения, в которую выполняется копирование; по умолчанию 0.

startIndex

начало (включительно) копируемой части; по умолчанию 0.

endIndex

конец (не включительно) копируемой части; по умолчанию размер этого массива.

Выбрасывает

IndexOutOfBoundsException

если копируемая часть не помещается в массив назначения, начиная с указанного destinationOffset, или если этот индекс находится за пределами диапазона индексов массива назначения.

Требования к платформе и версии: JS (1.3)

@IgnorableReturnValue
actual inline fun <T> Array<out T>.copyInto(destination: Array<T>, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): Array<T>
@IgnorableReturnValue
actual inline fun ByteArray.copyInto(destination: ByteArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): ByteArray
@IgnorableReturnValue
actual inline fun ShortArray.copyInto(destination: ShortArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): ShortArray
@IgnorableReturnValue
actual inline fun IntArray.copyInto(destination: IntArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): IntArray
@IgnorableReturnValue
actual inline fun LongArray.copyInto(destination: LongArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): LongArray
@IgnorableReturnValue
actual inline fun FloatArray.copyInto(destination: FloatArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): FloatArray
@IgnorableReturnValue
actual inline fun DoubleArray.copyInto(destination: DoubleArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): DoubleArray
@IgnorableReturnValue
actual inline fun BooleanArray.copyInto(destination: BooleanArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): BooleanArray
@IgnorableReturnValue
actual inline fun CharArray.copyInto(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): CharArray

Копирует этот массив или его часть в массив назначения и возвращает этот массив.

Можно передать тот же массив в качестве массива назначения и даже указать часть, перекрывающую диапазон назначения.

Возвращает

массив назначения.

Параметры

destination

массив, в который выполняется копирование.

destinationOffset

позиция в массиве назначения, в которую выполняется копирование; по умолчанию 0.

startIndex

начало (включительно) копируемой части; по умолчанию 0.

endIndex

конец (не включительно) копируемой части; по умолчанию размер этого массива.

Выбрасывает

IndexOutOfBoundsException

если копируемая часть не помещается в массив назначения, начиная с указанного destinationOffset, или если этот индекс находится за пределами диапазона индексов массива назначения.

Требования к платформе и версии: JVM (1.3), Native (1.3), Wasm-JS (1.8), Wasm-WASI (1.8)

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

Копирует этот массив или его часть в массив назначения и возвращает этот массив.

Можно передать тот же массив в качестве массива назначения и даже указать часть, перекрывающую диапазон назначения.

Возвращает

массив назначения.

Параметры

destination

массив, в который выполняется копирование.

destinationOffset

позиция в массиве назначения, в которую выполняется копирование; по умолчанию 0.

startIndex

начало (включительно) копируемой части; по умолчанию 0.

endIndex

конец (не включительно) копируемой части; по умолчанию размер этого массива.

Выбрасывает

IndexOutOfBoundsException

если копируемая часть не помещается в массив назначения, начиная с указанного destinationOffset, или если этот индекс находится за пределами диапазона индексов массива назначения.

© 2010–2026 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/copy-into.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API