UNPKG

456 BTypeScriptView Raw
1/**
2 * @name hexStripPrefix
3 * @summary Strips any leading `0x` prefix.
4 * @description
5 * Tests for the existence of a `0x` prefix, and returns the value without the prefix. Un-prefixed values are returned as-is.
6 * @example
7 * <BR>
8 *
9 * ```javascript
10 * import { hexStripPrefix } from '@polkadot/util';
11 *
12 * console.log('stripped', hexStripPrefix('0x1234')); // => 1234
13 * ```
14 */
15export declare function hexStripPrefix(value?: string | null): string;