I am trying to convert string to UTF-8 and store it in shared preferences but after getting its value I can't convert string which contains byte array to string
var myString ="hello world"
var bytes :ByteArray = myString.toUtf8Bytes()
value of Bytes // [104, 101, 108, 108, 111, 32, 109, 121, 32, 119, 111, 114, 108, 100]
var result :String = bytes.contentToString()
value of result // "[104, 101, 108, 108, 111, 32, 109, 121, 32, 119, 111, 114, 108, 100]"
How can I get the value of myString from the result?
thanks in advance