Kotlin
// Get a ByteArray of the bytes that make up the target number value.
val bytes = 42.getBytes()
// Get a UByteArray of the bytes that make up the target number value.
val ubytes = 69.getUBytes()
// Write the bytes that make up a number into a given buffer.
val byteBuffer = ByteArray(4)
420.getBytes(buffer = byteBuffer, offset = 0)
// Write the ubytes that make up a number into a given buffer.
val ubyteBuffer = UByteArray(4)
666.getUBytes(buffer = ubyteBuffer)
Version | Docs | Description |
---|---|---|
|
Initial release. Contains conversion methods for signed and unsigned integral types. |