Locale-Sensitive Objective-C Method
Foundation NSString
NSString integerValue
Internationalization (I18n) Method Overview
Click here
for additional Apple Developer Documentation details.
I18n Issues
This method does not take locale into account. When converting from string to numeric type, use an NSScanner
object method
for localized scanning of numeric values from a string, e.g., scanInt , scanInteger ,
scanDecimal ,
scanDouble , or scanFloat .
Generally one needs to pass in locale , encoding or language to ensure
that any culture-dependent conversion is done properly.
If you determine that the call is i18n-safe, you can use Globalyzer's
Ignore Comment functionality to ensure that it isn't
picked up in a subsequent scan.
For information about Objective-C Internationalization, click here.
|