StructureSwift
String.StandardComparator
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Compares
Strings using one of a fixed set of standard comparison algorithms.struct StandardComparator
Topics
Initializers
init(String.StandardComparator, order: SortOrder)Create aStandardComparatorfrom the givenStandardComparatorwith the given neworder.init(from: any Decoder) throws
Instance Properties
Instance Methods
func compare(String, String) -> ComparisonResultfunc encode(to: any Encoder) throwsfunc hash(into: inout Hasher)
Type Aliases
Type Properties
static let lexical: String.StandardComparatorComparesStrings lexically.
Relationships
Conforms To
SortComparatorSwift.DecodableSwift.EncodableSwift.EquatableSwift.HashableSwift.SendableSwift.SendableMetatype