Function

CFNumberFormatterGetDecimalInfoForCurrencyCode(_:_:_:)

Returns the number of fraction digits that should be displayed, and the rounding increment, for a given currency.

Declaration

func CFNumberFormatterGetDecimalInfoForCurrencyCode(_ currencyCode: CFString!, _ defaultFractionDigits: UnsafeMutablePointer<Int32>!, _ roundingIncrement: UnsafeMutablePointer<Double>!) -> Bool

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.0 if 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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software