34 lines
1.0 KiB
Kotlin
34 lines
1.0 KiB
Kotlin
package com.infendro.bytes.long
|
|
|
|
import com.infendro.bytes.ByteOrder
|
|
import com.infendro.bytes.ByteOrder.BIG_ENDIAN
|
|
import com.infendro.bytes.ulong.copyInto
|
|
|
|
fun Long.copyInto(
|
|
destination: UByteArray,
|
|
destinationOffset: Int = 0,
|
|
order: ByteOrder = BIG_ENDIAN,
|
|
) = toULong().copyInto(destination, destinationOffset, order)
|
|
|
|
fun Long.copyInto(
|
|
destination: ByteArray,
|
|
destinationOffset: Int = 0,
|
|
order: ByteOrder = BIG_ENDIAN,
|
|
) = toULong().copyInto(destination, destinationOffset, order)
|
|
|
|
fun LongArray.copyInto(
|
|
destination: UByteArray,
|
|
destinationOffset: Int = 0,
|
|
startIndex: Int = 0,
|
|
endIndex: Int = size,
|
|
order: ByteOrder = BIG_ENDIAN,
|
|
) = asULongArray().copyInto(destination, destinationOffset, startIndex, endIndex, order)
|
|
|
|
fun LongArray.copyInto(
|
|
destination: ByteArray,
|
|
destinationOffset: Int = 0,
|
|
startIndex: Int = 0,
|
|
endIndex: Int = size,
|
|
order: ByteOrder = BIG_ENDIAN,
|
|
) = asULongArray().copyInto(destination, destinationOffset, startIndex, endIndex, order)
|