How would you parse the location text from Twitter to get the latitude/longitude in Objective-C?
- by Brennan
The location text from Twitter could be just about anything. Sometimes Twitter clients set the location with the user's latitude and longitude in the following format.
"\U00dcT: 43.05948,-87.908409"
Since there is no built-in support for Regular Expressions in Objective-C I am considering using the NSString functions like rangeOfString to pull the float values out of this string.
For my current purpose I know the values with start with 43 and 87 so I can key off those values this time but I would prefer to do better than that.
What would you do to parse the latitude/longitude from this string?