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