Contents

CFNumberFormatter

Declaration

class CFNumberFormatter

Overview

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

Examining a Number Formatter

Getting the CFNumberFormatter Type ID

Data Types

Constants

See Also

Related Documentation

Opaque Types