Hexadecimal String To Number Function
- Updated2025-03-14
- 3 minute(s) read
Interprets the characters 0 through 9, A through F, and a through f in string starting at offset as a hex integer and returns it in number.
The connector pane displays the default data types for this polymorphic function.

Inputs/Outputs
![]() string can be a string, a cluster of strings, an array of strings, or an array of clusters of strings. ![]() offset specifies number of characters into string at which the function starts searching for a match. offset must be numeric. The offset of the first character in string is 0. If offset is unwired or less than 0, the function takes offset as 0. ![]() default is any object of numeric representation and specifies the numeric representation for number. The default is a 32-bit unsigned integer value of 0. To return a 64-bit integer output, wire a 64-bit integer to default. ![]() offset past number is the index in string of the first character following the number. offset past number reflects the value from the last string if you input an array of strings. ![]() number can be a number, a cluster, an array of numbers, or an array of clusters depending on the structure of string and offset. If the input string represents a number outside the range of the representation of number, number is set to the maximum value for that data type. |
The following table illustrates how string, offset, and default affect number.
string | offset | default | offset past number | number | Comments |
---|---|---|---|---|---|
3ab | 0 | ![]() | 3 | 939 | The conversion starts from the first character 3, as offset specifies. |
3ab | 2 | ![]() | 3 | 11 | The conversion starts from the third character b, as offset specifies. |
1FFFFFFFF | 0 | ![]() | 9 | 4294967295 | number is a 32-bit unsigned integer, as default specifies. The result of the conversion is saturated because it is too large to be represented. |
1FFFFFFFF | 0 | ![]() | 9 | 8589934591 | number is a 64-bit unsigned integer, as default specifies. |
f3g | 0 | ![]() | 2 | 243 | g is not a valid hex character, so conversion stops there. The value of offset past number indicates the conversion stops at the third character g. |
–30 | 0 | ![]() | 0 | 0 | Negative numbers are not permitted for hex. |