Originally posted by Tom Blough:
I would suggest parsing the typed string from the right end. If the user enters +01234, start with the 4. The number you are trying to construct is 4x10e0.
Now get the next to last character - 3. The resulting number is now the previous value + 3x10e1. Then next would be 2x10e2 and so on until you reach the start of the string.
If the start of the string is a + or - then change the sign of the number accordingly, if it is another numeric character, process it like the previous ones.
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
Low Tech Laboratoryhttps://www.kickstarter.com/projects/paulwheaton/low-tech-0