https://kotlinlang.org logo
j

Jan

02/08/2022, 8:56 PM
Is there an easy way to convert an Int to a ByteArray in Kotlin (Multiplatform so no JVM methods)
Same for long would be helpful
t

Tim Oltjenbruns

02/08/2022, 9:10 PM
I would declare an expect/actual for this so you can integrate with the platform helpers for this. Or you can roll your own using the bitwise operators.
👍 1
3 Views