Re: Converting string to double: NSString or NSScanner

2008-06-02 Thread Sean McBride
On 5/31/08 10:35 PM, Michael Vannorsdel said: Basically NSString's floatValue and doubleValue methods only work when the numbers use the US style dot separator (as opposed to other locale separators such as a comma). If your NSString might contain non-US separators (or other formatting

Re: Converting string to double: NSString or NSScanner

2008-06-01 Thread Markus Spoettl
On May 31, 2008, at 9:35 PM, Michael Vannorsdel wrote: Basically NSString's floatValue and doubleValue methods only work when the numbers use the US style dot separator (as opposed to other locale separators such as a comma). If your NSString might contain non-US separators (or other

Re: Converting string to double: NSString or NSScanner

2008-05-31 Thread Michael Vannorsdel
Basically NSString's floatValue and doubleValue methods only work when the numbers use the US style dot separator (as opposed to other locale separators such as a comma). If your NSString might contain non-US separators (or other formatting differences) you'll have to use NSScanner to do

Converting string to double: NSString or NSScanner

2008-05-31 Thread Markus Spoettl
Hello List, I'm having troubles deciphering the documentation. I have doubles stored in a text file which always use the dot . as decimal separator. When converting the strings to doubles the conversion to be locale independent. The NSString:doubleValue documentation says: This method