init(code:locale:)
Creates a decimal currency format style that uses the given currency code and locale.
Declaration
init(code: String, locale: Locale = .autoupdatingCurrent)Parameters
- code:
The currency code to use, such as
EURorJPY. - locale:
The locale to use when formatting or parsing decimal values. Defaults to Autoupdatingcurrent.