copyTo

fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int)
fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int)

Copies bytes from this memory range from the specified offset and length to the destination.


expect fun Memory.copyTo(destination: Memory, offset: Int, length: Int, destinationOffset: Int)
expect fun Memory.copyTo(destination: Memory, offset: Long, length: Long, destinationOffset: Long)

Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset. Copying bytes from a memory to itself is allowed.


expect fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int, destinationOffset: Int)
expect fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int, destinationOffset: Int)

Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.

fun Memory.copyTo(destination: ArrayBuffer, offset: Int, length: Int, destinationOffset: Int)
fun Memory.copyTo(destination: ArrayBufferView, offset: Int, length: Int, destinationOffset: Int)
fun ArrayBuffer.copyTo(destination: Memory, offset: Int, length: Int, destinationOffset: Int)
fun ArrayBufferView.copyTo(destination: Memory, offset: Int, length: Int, destinationOffset: Int)
actual fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int, destinationOffset: Int)
actual fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int, destinationOffset: Int)

Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.


actual fun Memory.copyTo(destination: Memory, offset: Int, length: Int, destinationOffset: Int)
actual fun Memory.copyTo(destination: Memory, offset: Long, length: Long, destinationOffset: Long)

Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset. Copying bytes from a memory to itself is allowed.

fun Memory.copyTo(destination: ByteBuffer, offset: Int)
fun Memory.copyTo(destination: ByteBuffer, offset: Long)

Copies bytes from this memory range from the specified offset to the destination buffer.

fun Memory.copyTo(destination: CPointer<ByteVar>, offset: Int, length: Int, destinationOffset: Int)
fun Memory.copyTo(destination: CPointer<ByteVar>, offset: Long, length: Long, destinationOffset: Long)

Copy content bytes to the memory addressed by the destination pointer with the specified destinationOffset in bytes.


fun CPointer<ByteVar>.copyTo(destination: Memory, offset: Int, length: Int, destinationOffset: Int)
fun CPointer<ByteVar>.copyTo(destination: Memory, offset: Long, length: Long, destinationOffset: Long)

Copy length bytes to the destination at the specified destinationOffset from the memory addressed by this pointer with offset in bytes.


actual fun Memory.copyTo(destination: Memory, offset: Int, length: Int, destinationOffset: Int)
actual fun Memory.copyTo(destination: Memory, offset: Long, length: Long, destinationOffset: Long)

Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset. Copying bytes from a memory to itself is allowed.


actual fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int, destinationOffset: Int)
actual fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int, destinationOffset: Int)

Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.