跳转到主要内容

Encoding functions

import { Badge } from "~/components"

bin

Usage:

bin(<expression>)

bin returns a string containing the binary representation of its argument.

Examples:

-- get the binary representation of 1
bin(1)
-- get the binary representation of a string`
bin('abc')

hex

Usage:

hex(<expression>)

hex returns a string containing the hexadecimal representation of its argument.

Examples:

-- get the hexadecimal representation of 1
hex(1)
-- get the hexadecimal representation of a string`
hex('abc')