Instance Method インスタンスメソッド

compare(_:_:)

Provides the relative ordering of two elements based on the sort order of the comparator.

Declaration 宣言

func compare(_ lhs: Self.Compared, _ rhs: Self.Compared) -> ComparisonResult

Parameters パラメータ

lhs

The first element to compare. 比較する最初の要素。

rhs

The second element to compare. 比較する2番目の要素。

Return Value 戻り値

The relative ordering between the two elements according to the sort order of the comparator.

See Also 参照

Using a Comparator コンパレータを使う