Skip to content

Home > sculp-js > numberToHex

numberToHex() function

将十进制转换成任意进制

Signature:

typescript
export declare function numberToHex(decimal: number | string, hexPool?: string): string;

Parameters

Parameter

Type

Description

decimal

number | string

十进制数值或字符串,可以是任意长度,会使用大数进行计算

hexPool

string

(Optional) 进制池,默认 62 进制

Returns:

string

{string}

Released under the MIT License.