当前位置: 首页>>编程示例 >>用法及示例精选 >>正文


Node.js util.TextDecoder用法及代码示例

类:util.TextDecoder

添加于:v8.3.0

WHATWG Encoding Standard TextDecoder API 的实现。

const decoder = new TextDecoder();
const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
console.log(decoder.decode(u8arr)); // Hello

相关用法


注:本文由纯净天空筛选整理自nodejs.org大神的英文原创作品 util.TextDecoder。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。