Decodes UTF-8 bytes into a string.
decode(bytes)
bytes
The Uint8Array to decode.
A decoded string.
Invalid characters are replaced with the Unicode replacement character "\uFFFD".
utf8.decode(new Uint8Array([104, 101, 108, 108, 111, 32, 240, 159, 144, 165]))
"hello 🐥"
// same as
new TextDecoder().decode(new Uint8Array([104, 101, 108, 108, 111, 32, 240, 159, 144, 165]))
"hello 🐥"