类:util.TextDecoder
\Class: util.TextDecoder
新增于: v8.3.0
WHATWG 编码标准 TextDecoder API 的实现。
\An implementation of the WHATWG Encoding Standard TextDecoder API.
const decoder = new TextDecoder();
const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
console.log(decoder.decode(u8arr)); // Hello