Hexadecimal String to Number
- Updated2023-02-17
- 3 minute(s) read
Hexadecimal String to Number
Converts the characters 0 through 9, A through F, and a through f in a string to a hexadecimal integer.

Inputs/Outputs

string
The string that you want to convert.

offset
The number of characters into the input string at which this node begins its operation.
The offset of the first character in the input string is 0. If offset is beyond the end of the input string, this node returns an empty string.
Default value: 0

default
A numeric value whose representation determines the representation of number.
Default value: 32-bit unsigned integer

offset past number
The index in string of the first character following the number.
If string is an array of strings, offset past number reflects the offset within the last string.

number
The result of converting string into a number.
If the input string represents a number outside the range of the representation of number, number is set to the maximum value for that representation.
Examples
string | offset | default | offset past number | number | Comments |
---|---|---|---|---|---|
f3g | 0 | 0 | 2 | 243 | g is not a valid hex character, so conversion stops there. |
–30 | 0 | 0 | 0 | 0 | Negative numbers are not permitted for hex. |