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