One Logo Pool Ball
Foundation · IOS API REFERENCE

Locale.Currency

struct · iOS 16.0+ · SDK 27.1

struct Currency

A type that represents the currency system used by a locale, like dollars or euros.

Members (8)

get · iOS 16.0+

identifier

TypeScript
get identifier(): string
Swift declaration
var identifier: String { get set }

The currency's identifier.

set · iOS 16.0+

identifier

TypeScript
set identifier(value: string)
Swift declaration
var identifier: String { get set }

The currency's identifier.

get · iOS 16.0+

isISOCurrency

TypeScript
get isISOCurrency(): boolean
Swift declaration
var isISOCurrency: Bool { get }

A Boolean value that indicates whether the currency is in the list of ISO-defined currencies.

get · iOS 16.0+

isoCurrencies

TypeScript
static get isoCurrencies(): Array<Locale_Currency>
Swift declaration
static var isoCurrencies: [Locale.Currency] { get }

An array containing currencies defined by the currency codes in ISO-4217.

init · iOS 16.0+

init

TypeScript
static initStringLiteral(value: string): Locale_Currency
Swift declaration
init(stringLiteral value: String)

Creates a currency instance from a BCP 47 identifier as a string literal. - Parameter value: The currency's BCP 47 identifier, like `usd` for US dollars, or `jpy` for Japanese yen.

get · iOS 17.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 16.0+

unknown

TypeScript
static get unknown(): Locale_Currency
Swift declaration
static let unknown: Locale.Currency

A representation of an "unknown" currency, for use with transactions that don't involve any currency.

init · iOS 16.0+

init

TypeScript
static init(identifier: string): Locale_Currency
Swift declaration
init(_ identifier: String)

Creates a currency instance from a BCP 47 identifier. - Parameter identifier: The currency's BCP 47 identifier, like `usd` for US dollars, or `jpy` for Japanese yen.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →