Instance Methodswift 6.0.3FoundationInternationalization->Swift
encode(to:)
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
func encode(to encoder: any Encoder) throws
func encode(to encoder: any Encoder) throws
sSS30FoundationInternationalizationE10ComparatorV6encode2toys7Encoder_p_tKF
What are these?3ITRX
import Swift
import FoundationInternationalization
struct Comparator
A String
comparison performed using the given comparison options and locale.
@frozen struct String
A Unicode string value that is a collection of characters.
protocol Encoder
A type that can encode values into a native format for external representation.
init(_ standardComparison: String.StandardComparator)
Creates a String.Comparator
that represents the same comparison as the given String.StandardComparator
.
init(from decoder: any Decoder) throws
init(options: String.CompareOptions, order: SortOrder = .forward)
let locale: Locale?
The locale to use for comparison if the comparator is localized, otherwise nil.
let options: String.CompareOptions
The options to use for comparison.
var order: SortOrder
func compare(_ lhs: String, _ rhs: String) -> ComparisonResult
func hash(into hasher: inout Hasher)