We already have means to serialize numbers within the NXT software: the Number To Text Building Block. So I decided the inverse of this Block is needed: Text To Int (GSAText2Int).
Practically this Block is capable to convert a a string containing a number in decimal notation to an integer, given the string and the starting offset of the number. The end of the number is marked by the first non numeric character.
Inputs: 1. Input String 2. Offset 3. Default (in case conversion fails this number will be presented at the output) Outputs: 1. Output Value 2. New Offset (this is the point where our number ends) Example: Input String = "12345", Offset = 0 => Number = 12345, New Offset = 5 Input String = "12345.678", Offset = 0 => Number = 12345, New Offset =5 Input String = "12345.678", Offset = 3 => Number = 45, New Offset = 5
Notice this Block converts integers so the '.' (decimal point) is treated as non numeric.
You can download GSAText2Int here.