Skip to content

Initializer

init(code:locale:)

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
Creates a floating-point currency format style that uses the given currency code and locale.
init(code: String, locale: Locale = .autoupdatingCurrent)

Parameters

code

The currency code to use, such as EUR or JPY.

locale

The locale to use when formatting or parsing floating-point values. Defaults to Locale.autoupdatingCurrent.