This is probably a simple solution. I am working with w text file and extracting some time and sensor values, some work and some don't. I have tried to compare the ones that do and as can be seen in the debug, the ones that work have 6 characters and the ones that don't have 13 characters, but they look exactly the same in the debug. The 13 character strings return NAN which indicates that the first charater is not recognised.
The first and second show a successful conversion (7.6188) the last one (8.2367) returns NAN. I have stepped through each of the strings and it would appear that there are spaces ("") between show of the characters, there is certainly a space at teh beginning before teh 8 so maybe this is the problem?
Sorry that's not so easy to do, the text file is from dropbox and the passes through a csv node to output an array of objects with each object representing a line of the file. This works fine and I have been able to convert the time etc, but only the col2 string cannot convert to a number. If I work through the string to check the characters at each position, there are "" (spaces?) an certain places. This may be the issue so I need to remove these from the string?
Hi, thanks for the help, I have found that there are spaces (empty characters?) in the string and if I can remove these the toFloat works. These spaces were only indicated in the debug window as a larger number of characters in the string