Skip to content

hexToArrayBuffer

Official

Converts a hex string to an ArrayBuffer.

Import:

import { hexToArrayBuffer } from 'obsidian';

Example:

console.log(hexToArrayBuffer('00112233445566778899aabbccddeeff'));

Signature:

function hexToArrayBuffer(hex: string): ArrayBuffer

Parameters:

ParameterTypeDescription
hexstringThe hex string to convert.

Returns: ArrayBuffer — The ArrayBuffer.

Example:

console.log(hexToArrayBuffer('00112233445566778899aabbccddeeff'));