845 B
845 B
Functions
hexStripPrefix
▸ hexStripPrefix(value: * string | null | undefined*): string
Defined in hex/stripPrefix.ts:24
name: hexStripPrefix
signature: hexStripPrefix (value: ?string): string
summary: Strips any leading 0x prefix.
description: Tests for the existence of a 0x prefix, and returns the value without the prefix. Un-prefixed values are returned as-is.
example:
import { hexStripPrefix } from '@polkadot/util';
console.log('stripped', hexStripPrefix('0x1234')); // => 1234
Parameters:
| Name | Type |
|---|---|
| value | string | null | undefined |
Returns: string