类:util.TextDecoder
🌐 Class: util.TextDecoder
版本历史
| 版本 | 变更 |
|---|---|
| v11.0.0 | The class is now available on the global object. |
| v8.3.0 | 新增于: 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