docs-v2/content/flux/v0/stdlib/contrib/bonitoo-io/hex/int.md

1.4 KiB

title description menu weight
hex.int() function `hex.int()` converts a hexadecimal string to an integer.
flux_v0_ref
name parent identifier
hex.int contrib/bonitoo-io/hex contrib/bonitoo-io/hex/int
301

hex.int() converts a hexadecimal string to an integer.

Function type signature
(v: string) => int

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Parameters

v

({{< req >}}) String to convert.

Examples

Convert hexadecimal string to integer

import "contrib/bonitoo-io/hex"

hex.int(v: "4d2")// Returns 1234