Attributed
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
struct Attributed
struct Attributed
s30FoundationInternationalization24FloatingPointFormatStyleV10AttributedV
What are these?7X8RW
where Value:BinaryFloatingPoint
import FoundationInternationalization
struct FloatingPointFormatStyle<Value> where Value : BinaryFloatingPoint
protocol BinaryFloatingPoint : ExpressibleByFloatLiteral, FloatingPoint
A radix-2 (binary) floating-point type.
var parseStrategy: FloatingPointParseStrategy<FloatingPointFormatStyle<Value>> { get }
func consuming(_ input: String, startingAt index: String.Index, in bounds: Range<String.Index>) throws -> (upperBound: String.Index, output: Value)?
func format(_ value: Value) -> String
func locale(_ locale: Locale) -> FloatingPointFormatStyle<Value>
struct Currency
struct Percent
typealias RegexOutput = Value
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol FormatStyle : Decodable, Encodable, Hashable
A type that can convert a given data type into a representation.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(from decoder: any Decoder) throws
func format(_ value: Value) -> AttributedString
Returns an attributed string with NumberFormatAttributes.SymbolAttribute
and NumberFormatAttributes.NumberPartAttribute
.
func locale(_ locale: Locale) -> FloatingPointFormatStyle<Value>.Attributed
static func currency<Value>(code: String) -> Self where Self == FloatingPointFormatStyle<Value>.Currency, Value : BinaryFloatingPoint
static func currency<V>(code: String) -> Self where Self == IntegerFormatStyle<V>.Currency, V : BinaryInteger
static func list<MemberStyle, Base>(memberStyle: MemberStyle, type: ListFormatStyle<MemberStyle, Base>.ListType, width: ListFormatStyle<MemberStyle, Base>.Width = .standard) -> Self where Self == ListFormatStyle<MemberStyle, Base>, MemberStyle : FormatStyle, Base : Sequence, MemberStyle.FormatInput == Base.Element, MemberStyle.FormatOutput == String
static func list<Base>(type: ListFormatStyle<StringStyle, Base>.ListType, width: ListFormatStyle<StringStyle, Base>.Width = .standard) -> Self where Self == ListFormatStyle<StringStyle, Base>, Base : Sequence, Base.Element == String
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.