Instance Methodswift 6.0.3FoundationEssentials
compare(_:_:)
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
func compare(_ lhs: Compared, _ rhs: Compared) -> ComparisonResult
func compare(_ lhs: Compared, _ rhs: Compared) -> ComparisonResult
s20FoundationEssentials20ComparableComparatorV7compareyAA16ComparisonResultOx_xtF
What are these?7YYAU
import FoundationEssentials
struct ComparableComparator<Compared> where Compared : Comparable
Compares Comparable
types using their comparable implementation.
@frozen enum ComparisonResult
Used to indicate how items in a request are ordered, from the first one given in a method invocation or function call to the last (that is, left to right in code). Given the function:
init(order: SortOrder = .forward)
var order: SortOrder