Static Methodswift 6.0.3FoundationInternationalization->_StringProcessing
localizedCurrency(code:locale:)
Creates a regex component to match a localized currency string and capture it as a Decimal
. For example, localizedIntegerCurrency(code: "USD", locale: Locale(identifier: "en_US"))
matches “$52,249.98” and captures it as 52249.98.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
static func localizedCurrency(code: Locale.Currency, locale: Locale) -> Self
Parameters
Returns
A RegexComponent
to match a localized currency number.