remove unsigned support
This commit is contained in:
@@ -3,8 +3,8 @@ package com.infendro.bytes.int
|
||||
import com.infendro.bytes.ByteOrder
|
||||
import com.infendro.bytes.ByteOrder.BIG_ENDIAN
|
||||
|
||||
fun Int.toByteArray(order: ByteOrder = BIG_ENDIAN): ByteArray =
|
||||
ByteArray(4).also { copyInto(it, order = order) }
|
||||
|
||||
fun Int.toUByteArray(order: ByteOrder = BIG_ENDIAN): UByteArray =
|
||||
UByteArray(4).also { copyInto(it, order = order) }
|
||||
fun Int.toByteArray(order: ByteOrder = BIG_ENDIAN): ByteArray {
|
||||
val result = ByteArray(4)
|
||||
copyInto(result, order = order)
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user