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

1.4 KiB

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

hex.uint() converts a hexadecimal string to an unsigned integer.

Function type signature
(v: string) => uint

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

Parameters

v

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

Examples

Convert a hexadecimal string to an unsigned integer

import "contrib/bonitoo-io/hex"

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