StructureFoundationInternationalization
FloatingPointFormatStyle.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 floating-point values into attributed strings.
struct Attributed
Overview
Use the attributed modifier on a FloatingPointFormatStyle 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
Initializers
Instance Methods
func format(Value) -> AttributedStringFormats a floating-point value, using this style.func locale(Locale) -> FloatingPointFormatStyle<Value>.AttributedModifies the format style to use the specified locale.
Relationships
Conforms To
FormatStyleSwift.DecodableSwift.EncodableSwift.EquatableSwift.HashableSwift.SendableSwift.SendableMetatype