String to Value Node¶
The String to Value node converts a text string into a numerical value. This is useful for parsing numbers from text input, file data, or dynamically generated strings.
The node reads characters from the beginning of the string until a valid number is parsed. If parsing is unsuccessful, the node outputs a floating-point value of 0.
Entradas¶
- Cadena de texto
The input text string to be converted into a numerical value.
Propiedades¶
- Tipo de datos
El tipo de valor numérico al cual convertir:
- Decimal:
Converts the text to a floating-point number.
- Entero:
Converts the text to a 32-bit integer.
Salidas¶
- Valor
The resulting numerical value after conversion.
- Longitud
The number of characters successfully parsed as part of the number. This indicates where the numeric portion of the string ends, allowing further substring operations.
Ejemplos¶
Converting the string
"3.1415"with Float selected outputs a value of3.1415and a length of6.Converting
"42abc"with Integer selected outputs42and a length of2.Converting an invalid string such as
"hello"outputs0and a length of0.