Functions

hexHasPrefix

▸ hexHasPrefix(value?: string | null): boolean

Defined in hex/hasPrefix.ts:21

name: hexHasPrefix

summary: Tests for the existence of a 0x prefix.

description: Checks for a valid hex input value and if the start matched 0x

example:

import { hexHasPrefix } from '@polkadot/util';

console.log('has prefix', hexHasPrefix('0x1234')); // => true
1
2
3

Parameters:

Name Type
Optional value string | null

Returns: boolean


Last Updated: 2/26/2019, 11:50:54 AM