CFNumberFormatter
Declaration
class CFNumberFormatterOverview
CFNumberFormatter objects format the textual representations of CFNumber objects, and convert textual representations of numbers into CFNumber objects. The representation encompasses integers, floats, and doubles; floats and doubles can be formatted to a specified decimal position. You specify how strings are formatted and parsed by setting a format string and other properties of a CFNumberFormatter object.
The format of the format string is defined by Unicode Technical Standard #35; the version of the standard used varies with release of the operating system, and is described in Introduction to Data Formatting Programming Guide For Cocoa.
Unlike some other Core Foundation opaque types with names similar to a corresponding Cocoa Foundation class (such as CFString and NSString), CFNumberFormatter objects cannot be cast (“toll-free bridged”) to NSNumberFormatter objects.
Topics
Creating a Number Formatter
Configuring a Number Formatter
Formatting Values
CFNumberFormatterCreateNumberFromString(_:_:_:_:_:)CFNumberFormatterCreateStringWithNumber(_:_:_:)CFNumberFormatterCreateStringWithValue(_:_:_:_:)CFNumberFormatterGetDecimalInfoForCurrencyCode(_:_:_:)CFNumberFormatterGetValueFromString(_:_:_:_:_:)
Examining a Number Formatter
CFNumberFormatterCopyProperty(_:_:)CFNumberFormatterGetFormat(_:)CFNumberFormatterGetLocale(_:)CFNumberFormatterGetStyle(_:)