Data Types\Number\ Conversion
Number To String
The Number to String node enables the user to convert a numerical value to a string by either typing in a numerical value in the Number field or by attaching a value or a variable node to that port. Then once the conversion is executed, the resulting string can be acquired through the String port.
String To Number
Turns a piece of text into a number you can do math with or compare.
What it does
This node reads the text you give it and hands back the matching number. For example, the text “42” comes back as the number 42, and “3.14” comes back as 3.14. Negative values like “-7” work too. This is handy when a value arrives as text—say from something the user typed—but you need it as a real number for calculations or comparisons.
The conversion only works when the text actually looks like a number. If you pass in something that isn’t a number, such as “hello”, you get no number back (an empty result). The original text is never changed—you simply get a new number value. This node is the reverse of the “Number To String” node on the same page.
Inputs
“42” or “3.14”.
Outputs
Example
“3.14”
Number output
3.14
