In Brad's CorePlot I've seen this snippet, which eliminated the need for some coffee. I'm totally awake now:
NSDecimal result;
NSScanner *theScanner = [[NSScanner alloc] initWithString:stringRepresentation];
[theScanner scanDecimal:&result];
And Apple says:
A scanner’s locale affects the way it interprets values from the string. In particular, a scanner uses the locale’s decimal separator to distinguish the integer and fractional parts of floating-point representations. A new scanner’s locale is by default nil, which causes it to use non-localized values.
So: If I create a NSScanner instance and don't provide a locale, it will expect the decimal value represented by the string just like if I typed it in plain source code in?
i.E. @"-59933845504572.944882211" or @"123.456789" or @"145.002e33" or @"145.002e-33"? Would that be correct?