Issue
I'm creating a currency converter and using the Google Finance API to do so.
I'm following these simple instructions.
The URL outputs a page that looks something like this:
{lhs: "100 Euros",rhs: "132.240437 Australian dollars",error: "",icc: true}
My question is, what is the best way to extract the outputted value (132.240437) as a string?
Solution
The simplest way is to use RegEx (e.g. RegexKit Lite). For this task you'll need:
[respStr stringByMatching:@".*rhs: \"([0-9\-\.]*)" capture:1L];
Answered By - OdNairy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.