--- title: hex.int() function description: > `hex.int()` converts a hexadecimal string to an integer. menu: flux_v0_ref: name: hex.int parent: contrib/bonitoo-io/hex identifier: contrib/bonitoo-io/hex/int weight: 301 --- `hex.int()` converts a hexadecimal string to an integer. ##### Function type signature ```js (v: string) => int ``` {{% caption %}} For more information, see [Function type signatures](/flux/v0/function-type-signatures/). {{% /caption %}} ## Parameters ### v ({{< req >}}) String to convert. ## Examples ### Convert hexadecimal string to integer ```js import "contrib/bonitoo-io/hex" hex.int(v: "4d2")// Returns 1234 ```