u8aToHex
Creates a hex string from a Uint8Array object.
UInt8Array input values return the actual hex string. null or undefined values returns an 0x string.
UInt8Array
null
undefined
0x
import { u8aToHex } from '@polkadot/util';u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f Copy
import { u8aToHex } from '@polkadot/util';u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f
Optional
Generated using TypeDoc
Name
u8aToHex
Summary
Creates a hex string from a Uint8Array object.
Description
UInt8Array
input values return the actual hex string.null
orundefined
values returns an0x
string.Example