I'm experimenting with writing an ethereum-usd price ticker taking data from the coinmarketcap API using Oraclize's API.
I noticed that Oraclize has a function called parseInt
that can be used to remove the numbers after the decimal from a string (such as 10.99) an turn it into the uint 10.
As far as I can tell this ONLY works with strings that have a FIXED length after the decimals. As per CMCs API, the length after the decimal is variable in length. I've noticed it being values such as 1000.99 or 1000.991
I'm unable to figure out how to parse this string of a variable decimal length and turn it into a whole number.