StructureFoundationInternationalization
IntegerFormatStyle.Currency
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
A format style that converts between integer currency values and their textual representations.
struct Currency
Topics
Initializers
init(code: String, locale: Locale)Creates an integer currency format style that uses the given currency code and locale.init(from: any Decoder) throws
Instance Properties
var attributed: IntegerFormatStyle<Value>.AttributedAn attributed format style based on the integer currency format style.let currencyCode: StringThe currency code this format style uses, such asUSDorEUR.var locale: LocaleThe locale of the format style.
Instance Methods
func decimalSeparator(strategy: IntegerFormatStyle<Value>.Currency.Configuration.DecimalSeparatorDisplayStrategy) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified decimal separator display strategy.func grouping(IntegerFormatStyle<Value>.Currency.Configuration.Grouping) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified grouping.func notation(IntegerFormatStyle<Value>.Currency.Configuration.Notation) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified notation.func precision(IntegerFormatStyle<Value>.Currency.Configuration.Precision) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified precision.func presentation(IntegerFormatStyle<Value>.Currency.Configuration.Presentation) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified presentation.func rounded(rule: IntegerFormatStyle<Value>.Currency.Configuration.RoundingRule, increment: Int?) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified rounding rule and increment.func scale(Double) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified scale.func sign(strategy: IntegerFormatStyle<Value>.Currency.Configuration.SignDisplayStrategy) -> IntegerFormatStyle<Value>.CurrencyModifies the format style to use the specified sign display strategy for displaying or omitting sign symbols.
Type Aliases
Default Implementations
Relationships
Conforms To
FormatStyleParseableFormatStyleSwift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.HashableSwift.SendableSwift.SendableMetatype_StringProcessing.CustomConsumingRegexComponent_StringProcessing.RegexComponent