Join Slack
Powered by
no. the representations in memory are not the same...
# announcements
j
jw
03/06/2019, 5:43 AM
no. the representations in memory are not the same. you need to do something like
Array(bytes.size) { bytes[it] }
to box. i don't think there's built-in array boxing functions
k
karelpeeters
03/06/2019, 8:09 AM
There's `toTypedArray`:
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/to-typed-array.html
j
jw
03/06/2019, 2:07 PM
Huh. I only ever used that on Collection subtypes. Didn't know it had receiver overloads for primitive arrays
Open in Slack
Previous
Next