mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 06:47:57 +00:00
16 lines
455 B
TypeScript
16 lines
455 B
TypeScript
/**
|
|
* @name hexStripPrefix
|
|
* @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
|
|
* <BR>
|
|
*
|
|
* ```javascript
|
|
* import { hexStripPrefix } from '@pezkuwi/util';
|
|
*
|
|
* console.log('stripped', hexStripPrefix('0x1234')); // => 1234
|
|
* ```
|
|
*/
|
|
export declare function hexStripPrefix(value?: string | null): string;
|