StructureFoundationInternationalization
Decimal.FormatStyle.Attributed
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
A format style that converts decimal values into attributed strings.
struct Attributed
Overview
Use the attributed modifier on a Decimal.FormatStyle to create a format style of this type.
The attributed strings that this format style creates contain attributes from the AttributeScopes.FoundationAttributes.NumberFormatAttributes attribute scope. Use these attributes to determine which runs of the attributed string represent different parts of the formatted value.
Topics
Instance Methods
func format(Decimal) -> AttributedStringFormats a decimal value, using this style.func locale(Locale) -> Decimal.FormatStyle.AttributedModifies the format style to use the specified locale.
Default Implementations
Relationships
Conforms To
FormatStyleSwift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.HashableSwift.SendableSwift.SendableMetatype