Decimal String to Number
- Updated2023-02-17
- 3 minute(s) read
Decimal String to Number
Converts the numeric characters in a string to a decimal 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 signed 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 this output, this output returns the maximum or minimum value for the representation. For example, if the input string is 300, and the representation of this output is an 8-bit signed integer, this output returns 127.
Examples
| string | offset | default | offset past number | number | Comments |
|---|---|---|---|---|---|
| 13ax | 0 | 0 | 2 | 13 | — |
| –4.8bcde conversion | 0 | 0 | 2 | –4 | Because an integer is being converted, conversion stops at the decimal point. |
| a49b | 0 | –9 | 0 | –9 | default is used since no digits were read. |