CFNumberFormatter Reference
| Derived from | |
| Framework | CoreFoundation/CoreFoundation.h |
| Companion guide | |
| Declared in | CFNumberFormatter.h |
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.
Functions by Task
Creating a Number Formatter
Configuring a Number Formatter
Formatting Values
-
CFNumberFormatterCreateNumberFromString -
CFNumberFormatterCreateStringWithNumber -
CFNumberFormatterCreateStringWithValue -
CFNumberFormatterGetDecimalInfoForCurrencyCode -
CFNumberFormatterGetValueFromString
Examining a Number Formatter
-
CFNumberFormatterCopyProperty -
CFNumberFormatterGetFormat -
CFNumberFormatterGetLocale -
CFNumberFormatterGetStyle
Getting the CFNumberFormatter Type ID
Functions
CFNumberFormatterCopyProperty
Returns a copy of a number formatter’s value for a given key.
CFTypeRef CFNumberFormatterCopyProperty ( CFNumberFormatterRef formatter, CFStringRef key );
Parameters
- formatter
The number formatter to examine.
- key
A property key. See “Number Formatter Property Keys” for valid values.
Return Value
A CFType object that is a copy of the property value for key. Returns NULL if there is no value specified for key. Ownership follows the Create Rule in Memory Management Programming Guide for Core Foundation.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterCreate
Creates a new CFNumberFormatter object, localized to the given locale, which will format numbers to the given style.
CFNumberFormatterRef CFNumberFormatterCreate ( CFAllocatorRef allocator, CFLocaleRef locale, CFNumberFormatterStyle style );
Parameters
- alloc
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- locale
A locale to use for localization. If
NULL, the function uses the default system locale. UseCFLocaleCopyCurrentto specify the locale of the current user.- style
A number style. See “Number Formatter Styles” for possible values.
Return Value
A new number formatter, localized to the given locale, which will format numbers using the given style. Returns NULL if there was a problem creating the formatter. Ownership follows the Create Rule in Memory Management Programming Guide for Core Foundation.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterCreateNumberFromString
Returns a number object representing a given string.
CFNumberRef CFNumberFormatterCreateNumberFromString ( CFAllocatorRef allocator, CFNumberFormatterRef formatter, CFStringRef string, CFRange *rangep, CFOptionFlags options );
Parameters
- alloc
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- formatter
The number formatter to use.
- string
The string to parse.
- rangep
A reference to a range that specifies the substring of string to be parsed. If
NULL, the whole string is parsed. On return, contains the range of the actual extent of the parse (may be less than the given range).- options
Specifies various configuration options to change the behavior of the parse. Currently,
kCFNumberFormatterParseIntegersOnlyis the only possible value for this parameter.
Return Value
A new number that represents the given string. Returns NULL if there was a problem creating the number. Ownership follows the Create Rule in Memory Management Programming Guide for Core Foundation.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterCreateStringWithNumber
Returns a string representation of the given number using the specified number formatter.
CFStringRef CFNumberFormatterCreateStringWithNumber ( CFAllocatorRef allocator, CFNumberFormatterRef formatter, CFNumberRef number );
Parameters
- alloc
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- formatter
The number formatter to use.
- number
The number from which to create a string representation.
Return Value
A new string that represents the given number in the specified format. Returns NULL if there was a problem creating the string. Ownership follows the Create Rule in Memory Management Programming Guide for Core Foundation.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterCreateStringWithValue
Returns a string representation of the given number or value using the specified number formatter.
CFStringRef CFNumberFormatterCreateStringWithValue ( CFAllocatorRef allocator, CFNumberFormatterRef formatter, CFNumberType numberType, const void *valuePtr );
Parameters
- alloc
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- formatter
The number formatter to use.
- numberType
The type of value that valuePtr references. Valid values are listed in
Number Types.- valuePtr
A pointer to the value to be converted.
Return Value
A new string that represents the given number or value formatted by formatter. Returns NULL if there was a problem creating the object. Ownership follows the Create Rule in Memory Management Programming Guide for Core Foundation.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterGetDecimalInfoForCurrencyCode
Returns the number of fraction digits that should be displayed, and the rounding increment, for a given currency.
Boolean CFNumberFormatterGetDecimalInfoForCurrencyCode ( CFStringRef currencyCode, int32_t *defaultFractionDigits, double *roundingIncrement );
Parameters
- currencyCode
A string containing a ISO 4217 3-letter currency code. For example, AUD for Australian Dollars, EUR for Euros.
- defaultFractionDigits
Upon return, contains the number of fraction digits that should be displayed for the currency specified by currencyCode.
- roundingIncrement
Upon return, contains the rounding increment for the currency specified by currencyCode, or
0.0if no rounding is done by the currency.
Return Value
true if the information was obtained successfully, otherwise false (for example, if the currency code is unknown or the information is not available).
Discussion
The returned values are not localized because these are properties of the currency.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterGetFormat
Returns a format string for the given number formatter object.
CFStringRef CFNumberFormatterGetFormat ( CFNumberFormatterRef formatter );
Parameters
- formatter
The number formatter to examine.
Return Value
The format string for formatter as was specified by calling the CFNumberFormatterSetFormat function, or derived from the number formatter’s style. The format of this string is defined by Unicode Technical Standard #35.. Ownership follows the Get Rule in Memory Management Programming Guide for Core Foundation.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterGetLocale
Returns the locale object used to create the given number formatter object.
CFLocaleRef CFNumberFormatterGetLocale ( CFNumberFormatterRef formatter );
Parameters
- formatter
The number formatter to examine.
Return Value
The locale used to create formatter. Ownership follows the Get Rule in Memory Management Programming Guide for Core Foundation.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterGetStyle
Returns the number style used to create the given number formatter object.
CFNumberFormatterStyle CFNumberFormatterGetStyle ( CFNumberFormatterRef formatter );
Parameters
- formatter
The number formatter to examine.
Return Value
The number style used to create formatter.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterGetTypeID
Returns the type identifier for the CFNumberFormatter opaque type.
CFTypeID CFNumberFormatterGetTypeID ( void );
Return Value
The type identifier for the CFNumberFormatter opaque type.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterGetValueFromString
Returns a number or value representing a given string.
Boolean CFNumberFormatterGetValueFromString ( CFNumberFormatterRef formatter, CFStringRef string, CFRange *rangep, CFNumberType numberType, void *valuePtr );
Parameters
- formatter
The number formatter to use.
- string
The string to parse.
- rangep
A reference to a range that specifies the substring of string to be parsed. If
NULL, the whole string is parsed. Upon return, contains the range of the actual extent of the parse (may be less than the given range).- numberType
The type of value that valuePtr references. Valid values are listed in
Number Types.- valuePtr
Upon return, contains a number or value representing the string in the specified format. You are responsible for releasing this value.
Return Value
true if the string was parsed successfully, otherwise false.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterSetFormat
Sets the format string of a number formatter.
void CFNumberFormatterSetFormat ( CFNumberFormatterRef formatter, CFStringRef formatString );
Parameters
- formatter
The number formatter to modify.
- formatString
The format string to be used by formatter. The format of this string is defined by Unicode Technical Standard #35.
Discussion
The format string may override other properties previously set using other functions. If this function is not called, the default value of the format string is derived from the number formatter’s style.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterSetProperty
Sets a number formatter property using a key-value pair.
void CFNumberFormatterSetProperty ( CFNumberFormatterRef formatter, CFStringRef key, CFTypeRef value );
Parameters
- formatter
The number formatter to modify.
- key
The name of the property of formatter to set. See “Number Formatter Property Keys” for a description of possible values.
- value
The value of the specified key. This must be an instance of the correct
CFTypeobject for the corresponding key.
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hData Types
CFNumberFormatterOptionFlags
Type for constants specifying how numbers should be parsed.
typedef CFOptionFlags CFNumberFormatterOptionFlags;
Discussion
For values, see “Number Format Options.”
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterPadPosition
Type for constants specifying how numbers should be padded.
typedef CFIndex CFNumberFormatterPadPosition;
Discussion
For values, see “Padding Positions.”
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterRef
A reference to a CFNumberFormatter object.
typedef struct __CFNumberFormatter *CFNumberFormatterRef;
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hCFNumberFormatterStyle
Type for constants specifying a formatter style.
typedef CFIndex CFNumberFormatterStyle;
Discussion
For values, see “Number Formatter Styles.”
Availability
- Available in iOS 2.0 and later.
Declared In
CFNumberFormatter.hConstants
Number Formatter Styles
Predefined number format styles.
enum {
kCFNumberFormatterNoStyle = 0,
kCFNumberFormatterDecimalStyle = 1,
kCFNumberFormatterCurrencyStyle = 2,
kCFNumberFormatterPercentStyle = 3,
kCFNumberFormatterScientificStyle = 4,
kCFNumberFormatterSpellOutStyle = 5
};
Constants
kCFNumberFormatterNoStyleSpecifies no style.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterDecimalStyleSpecifies a decimal style format.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterCurrencyStyleSpecifies a currency style format.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPercentStyleSpecifies a percent style format.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterScientificStyleSpecifies a scientific style format.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterSpellOutStyleSpecifies a spelled out format.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.
Discussion
The format for these number styles is not exact because they depend on the locale, user preference settings, and operating system version. Do not use these constants if you want an exact format (for example, if you are parsing data in a given format). In general, however, you are encouraged to use these styles to accommodate user preferences.
Number Formatter Property Keys
The keys used in key-value pairs to specify the value of number formatter properties.
const CFStringRef kCFNumberFormatterCurrencyCode; const CFStringRef kCFNumberFormatterDecimalSeparator; const CFStringRef kCFNumberFormatterCurrencyDecimalSeparator; const CFStringRef kCFNumberFormatterAlwaysShowDecimalSeparator; const CFStringRef kCFNumberFormatterGroupingSeparator; const CFStringRef kCFNumberFormatterUseGroupingSeparator; const CFStringRef kCFNumberFormatterPercentSymbol; const CFStringRef kCFNumberFormatterZeroSymbol; const CFStringRef kCFNumberFormatterNaNSymbol; const CFStringRef kCFNumberFormatterInfinitySymbol; const CFStringRef kCFNumberFormatterMinusSign; const CFStringRef kCFNumberFormatterPlusSign; const CFStringRef kCFNumberFormatterCurrencySymbol; const CFStringRef kCFNumberFormatterExponentSymbol; const CFStringRef kCFNumberFormatterMinIntegerDigits; const CFStringRef kCFNumberFormatterMaxIntegerDigits; const CFStringRef kCFNumberFormatterMinFractionDigits; const CFStringRef kCFNumberFormatterMaxFractionDigits; const CFStringRef kCFNumberFormatterGroupingSize; const CFStringRef kCFNumberFormatterSecondaryGroupingSize; const CFStringRef kCFNumberFormatterRoundingMode; const CFStringRef kCFNumberFormatterRoundingIncrement; const CFStringRef kCFNumberFormatterFormatWidth; const CFStringRef kCFNumberFormatterPaddingPosition; const CFStringRef kCFNumberFormatterPaddingCharacter; const CFStringRef kCFNumberFormatterDefaultFormat; const CFStringRef kCFNumberFormatterMultiplier; const CFStringRef kCFNumberFormatterPositivePrefix; const CFStringRef kCFNumberFormatterPositiveSuffix; const CFStringRef kCFNumberFormatterNegativePrefix; const CFStringRef kCFNumberFormatterNegativeSuffix; const CFStringRef kCFNumberFormatterPerMillSymbol; const CFStringRef kCFNumberFormatterInternationalCurrencySymbol; const CFStringRef kCFNumberFormatterCurrencyGroupingSeparator; const CFStringRef kCFNumberFormatterIsLenient; const CFStringRef kCFNumberFormatterUseSignificantDigits; const CFStringRef kCFNumberFormatterMinSignificantDigits; const CFStringRef kCFNumberFormatterMaxSignificantDigits;
Constants
kCFNumberFormatterCurrencyCodeSpecifies the currency code, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterDecimalSeparatorSpecifies the decimal separator, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterCurrencyDecimalSeparatorSpecifies the currency decimal separator, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterAlwaysShowDecimalSeparatorSpecifies if the result of converting a value to a string should always contain the decimal separator, even if the number is an integer.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterGroupingSeparatorSpecifies the grouping separator, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterUseGroupingSeparatorSpecifies if the grouping separator should be used, a
CFBooleanobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPercentSymbolSpecifies the string that is used to represent the percent symbol, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterZeroSymbolSpecifies the string that is used to represent zero, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterNaNSymbolSpecifies the string that is used to represent NaN (“not a number”) when values are converted to strings, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterInfinitySymbolSpecifies the string that is used to represent the symbol for infinity, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMinusSignSpecifies the symbol for the minus sign, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPlusSignSpecifies the symbol for the plus sign, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterCurrencySymbolSpecifies the symbol for the currency, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterExponentSymbolSpecifies the exponent symbol (“E” or “e”) in the scientific notation of numbers (for example, as in
1.0e+56), aCFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMinIntegerDigitsSpecifies the minimum number of integer digits before a decimal point, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMaxIntegerDigitsSpecifies the maximum number of integer digits before a decimal point, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMinFractionDigitsSpecifies the minimum number of digits after a decimal point, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMaxFractionDigitsSpecifies the maximum number of digits after a decimal point, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterGroupingSizeSpecifies how often the “thousands” or grouping separator appears, as in “10,000,000”, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterSecondaryGroupingSizeSpecifies how often the secondary grouping separator appears, a
CFNumberobject. See Unicode Technical Standard #35 for more information.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundingModeSpecifies how the last digit is rounded, as when
3.1415926535...is rounded to three decimal places, as in3.142, aCFNumberobject. See“Rounding Modes”for possible values.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundingIncrementSpecifies a positive rounding increment, or
0.0to disable rounding, aCFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterFormatWidthSpecifies the width of a formatted number within a string that is either left justified or right justified based on the value of
kCFNumberFormatterPaddingPosition, aCFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPaddingPositionSpecifies the position of a formatted number within a string, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPaddingCharacterSpecifies the padding character to use when placing a formatted number within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterDefaultFormatThe original format string for the formatter (given the date and time style and locale specified at creation), a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMultiplierSpecifies the multiplier to use when placing a formatted number within a string, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPositivePrefixSpecifies the plus sign prefix symbol to use when placing a formatted number within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPositiveSuffixSpecifies the plus sign suffix symbol to use when placing a formatted number within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterNegativePrefixSpecifies the minus sign prefix symbol to use when placing a formatted number within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterNegativeSuffixSpecifies the minus sign suffix symbol to use when placing a formatted number within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPerMillSymbolSpecifies the per mill (1/1000) symbol to use when placing a formatted number within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterInternationalCurrencySymbolSpecifies the international currency symbol to use when placing a formatted number within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterCurrencyGroupingSeparatorSpecifies the grouping symbol to use when placing a currency value within a string, a
CFStringobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterIsLenientSpecifies whether the formatter is lenient, a
CFBooleanobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterUseSignificantDigitsSpecifies the whether the formatter uses significant digits, a
CFBooleanobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMinSignificantDigitsSpecifies the minimum number of significant digits to use, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterMaxSignificantDigitsSpecifies the maximum number of significant digits to use, a
CFNumberobject.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.
Discussion
The values for these keys are all CFType objects. The specific types for each key are specified above.
Number Format Options
These constants are used to specify how numbers should be parsed.
enum {
kCFNumberFormatterParseIntegersOnly = 1
};
Constants
kCFNumberFormatterParseIntegersOnlySpecifies that only integers should be parsed.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.
Rounding Modes
These constants are used to specify how numbers should be rounded.
typedef enum {
kCFNumberFormatterRoundCeiling = 0,
kCFNumberFormatterRoundFloor = 1,
kCFNumberFormatterRoundDown = 2,
kCFNumberFormatterRoundUp = 3,
kCFNumberFormatterRoundHalfEven = 4,
kCFNumberFormatterRoundHalfDown = 5,
kCFNumberFormatterRoundHalfUp = 6
} CFNumberFormatterRoundingMode;
Constants
kCFNumberFormatterRoundCeilingRound up to next larger number with the proper number of fraction digits.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundFloorRound down to next larger number with the proper number of fraction digits.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundDownRound down to next larger number with the proper number of fraction digits.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundUpRound up to next larger number with the proper number of fraction digits.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundHalfEvenRound the last digit, when followed by a
5, toward an even digit (.25 -> .2, .35 -> .4)Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundHalfDownRound down when a
5follows putative last digit.Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterRoundHalfUpRound up when a 5 follows putative last digit.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.
Padding Positions
These constants are used to specify how numbers should be padded.
typedef enum {
kCFNumberFormatterPadBeforePrefix = 0,
kCFNumberFormatterPadAfterPrefix = 1,
kCFNumberFormatterPadBeforeSuffix = 2,
kCFNumberFormatterPadAfterSuffix = 3
};
Constants
kCFNumberFormatterPadBeforePrefixSpecifies the number of padding characters before the prefix.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPadAfterPrefixSpecifies the number of padding characters after the prefix.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPadBeforeSuffixSpecifies the number of padding characters before the suffix.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.kCFNumberFormatterPadAfterSuffixSpecifies the number of padding characters after the suffix.
Available in iOS 2.0 and later.
Declared in
CFNumberFormatter.h.
© 2003, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-05-23)