Initializerswift 6.0.3FoundationInternationalization->Swift
init(_:strategy:)
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
init<S>(_ value: S.ParseInput, strategy: S) throws where Self == S.ParseOutput, S : ParseStrategy
init<S>(_ value: S.ParseInput, strategy: S) throws where Self == S.ParseOutput, S : ParseStrategy
sSB30FoundationInternationalizationE_8strategyx10ParseInputQyd___qd__tKc0D6OutputQyd__Rsz0A10Essentials0D8StrategyRd__lufc
What are these?54U4D
import Swift
import FoundationInternationalization
protocol BinaryFloatingPoint : ExpressibleByFloatLiteral, FloatingPoint
A radix-2 (binary) floating-point type.
associatedtype ParseInput
The type of the representation describing the data.
associatedtype ParseOutput
The type of the data type.
protocol ParseStrategy : Decodable, Encodable, Hashable
A type that can parse a representation of a given data type.
init(_ value: String, format: FloatingPointFormatStyle<Self>.Percent, lenient: Bool = true) throws
init(_ value: String, format: FloatingPointFormatStyle<Self>.Currency, lenient: Bool = true) throws
init(_ value: String, format: FloatingPointFormatStyle<Self>, lenient: Bool = true) throws
Initialize an instance by parsing value
with a ParseStrategy
created with the given format
and the lenient
argument.
init<S>(_ value: S.ParseInput, strategy: S) throws where S : ParseStrategy, S.ParseOutput : BinaryFloatingPoint
Initialize an instance by parsing value
with the given strategy
.
func formatted() -> String
Format self
with FloatingPointFormatStyle()
.
func formatted<S>(_ format: S) -> S.FormatOutput where S : FormatStyle, S.FormatInput : BinaryFloatingPoint
Format self
with the given format. self
is first converted to S.FormatInput
type, then format with the given format.
func formatted<S>(_ format: S) -> S.FormatOutput where Self == S.FormatInput, S : FormatStyle
Format self
with the given format.