小程序String转ArrayBuffer
小程序String转ArrayBuffer
JS String转ArrayBuffer小程序String转ArrayBuffer
JS String转ArrayBuffer
var u8array = new TextEncoder("utf-8").encode("Hello World");
var string = new TextDecoder().decode(u8array);
var buff = u8array.buffer;
小程序String转ArrayBuffer
微信小程序不支持TextEncoder,String转ArrayBuffer可用方法如下:
var u8array = unescape(encodeURIComponent("Hello World")).split("").map(val => val.charCodeAt());
var buff =
共有 0 条评论