convert string to ByteString kotlin code example Example: kotlin string to bytes "my string".toByteArray()