Files
common/docs/util/modules/_hex_hasprefix_.md
T
2018-12-21 09:08:40 +00:00

784 B

Functions

hexHasPrefix

▸ hexHasPrefix(value: * string | null | undefined*): boolean

Defined in hex/hasPrefix.ts:22

name: hexHasPrefix

signature: hexHasPrefix (value: ?string): boolean

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

Parameters:

Name Type
value string | null | undefined

Returns: boolean