Hi, folks, Maybe someone can help me with this, I'm not able to get the same string I had after UTF8 encoding it.
Here is the code:
let input = "Hello World"
let data = input.data(using: String.Encoding.utf8)!
var but = String(data, encoding: String.Encoding.utf8)
Here is the playground output
"Hello World"
<48656c6c 6f20576f 726c64>
"(<48656c6c 6f20576f 726c64>, Unicode (UTF-8))"
what it is tha I'm doing wrong? Thanks in advance!