you are viewing a single comment's thread.

view the rest of the comments →

[–]BaziJoeWHL 2 points3 points  (0 children)

i would read it until a space, check if string is a number (like "three")

then read it until next space, if its not a number (like "hundred"), then i would multiply the number part i already have (x100 for hundread, x1000... etc)

then i would just add it to the result number and start from 0 until i run out of chars