Contents

CFNumberFormatterCreate(_:_:_:)

Creates a new CFNumberFormatter object, localized to the given locale, which will format numbers to the given style.

Declaration

func CFNumberFormatterCreate(_ allocator: CFAllocator!, _ locale: CFLocale!, _ style: CFNumberFormatterStyle) -> CFNumberFormatter!

Parameters

  • allocator:

    The allocator to use to allocate memory for the new object. Pass NULL or Kcfallocatordefault to use the current default allocator.

  • locale:

    A locale to use for localization. If NULL, the function uses the default system locale. Use Cflocalecopycurrent() to 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 The Create Rule.