ListFormatStyle
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
struct ListFormatStyle<Style, Base> where Style : FormatStyle, Base : Sequence, Style.FormatInput == Base.Element, Style.FormatOutput == String
struct ListFormatStyle<Style, Base> where Style : FormatStyle, Base : Sequence, Style.FormatInput == Base.Element, Style.FormatOutput == String
import FoundationInternationalization
protocol FormatStyle : Decodable, Encodable, Hashable
A type that can convert a given data type into a representation.
protocol Sequence<Element>
A type that provides sequential, iterated access to its elements.
associatedtype FormatInput
The type of data to format.
associatedtype Element where Self.Element == Self.Iterator.Element
A type representing the sequence’s elements.
associatedtype FormatOutput
The type of the formatted data.
@frozen struct String
A Unicode string value that is a collection of characters.
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 Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
init(from decoder: any Decoder) throws
init(memberStyle: Style)
var listType: ListFormatStyle<Style, Base>.ListType
var locale: Locale
var width: ListFormatStyle<Style, Base>.Width
func format(_ value: Base) -> String
func locale(_ locale: Locale) -> ListFormatStyle<Style, Base>
enum ListType
enum Width
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.
protocol Sendable