當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。