Skip to content

Type Property

forcedOrdering

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
If specified, comparisons are forced to return either .orderedAscending or .orderedDescending if the strings are equivalent but not strictly equal, for stability when sorting (e.g. “aaa” > “AAA” with .caseInsensitive specified)
static let forcedOrdering: String.CompareOptions