copyTo

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

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.