📌  相关文章
📜  js 字符串到数组缓冲区 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:18.036000             🧑  作者: Mango

代码示例1
if (!("TextEncoder" in window)) 
  alert("Sorry, this browser does not support TextEncoder...");

var enc = new TextEncoder(); // always utf-8
console.log(enc.encode("This is a string converted to a Uint8Array"));