setFromHex

Bun

Symbol

Uint8Array.setFromHex

setFromHex(hex: string): { read: number; written: number }

Set the contents of the Uint8Array from a hex encoded string

@param hex

The hex encoded string to decode into the array. The string must have an even number of characters, be valid hexadecimal characters and contain no whitespace.