Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

String mc.arrayBufferToBase64(ArrayBuffer arrayBuffer)

将 ArrayBuffer 对象转成 Base64 字符串

参数

参数类型默认值必填说明
arrayBufferArrayBuffer是要转换成 Base64 字符串的 ArrayBuffer 对象

返回值

类型说明
String转换后的 Base64 字符串

示例代码:

const arrayBuffer = new Uint8Array([104, 101, 108, 108, 111, 32, 109, 111, 114, 101, 99, 114, 111, 115, 115, 33]);
const base64String = mc.arrayBufferToBase64(arrayBuffer);