Instance Propertyswift 6.0.3FoundationInternationalization->Swift
options
The options to use for comparison.
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
let options: String.CompareOptions
The options to use for comparison.
let options: String.CompareOptions
sSS30FoundationInternationalizationE10ComparatorV7optionsSS0A10EssentialsE14CompareOptionsVvp
What are these?56HBV
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.
struct CompareOptions
These options apply to the various search/find and comparison methods (except where noted).
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.
var order: SortOrder
func compare(_ lhs: String, _ rhs: String) -> ComparisonResult
func encode(to encoder: any Encoder) throws
func hash(into hasher: inout Hasher)