What is your multiplatform replacement for <String...
# multiplatform
s
What is your multiplatform replacement for String.toByteArray() ? I want to target JVM, Android, macOS and iOS.
1
s
Thank you, will take that 🙂
o
There is also String.encodeToByteArray if charset is not needed
k
also Okio has ByteString https://square.github.io/okio/
I think
encodeToByteArray
will use utf8 by default
s
Yes, most do it and it’s a sensible default.