Return Value 戻り値
an array of the elements sorted using comparators
.
SortComparator
s to compare elements.Availability 有効性
Technology
func sorted<S, Comparator>(using comparators: S) -> [Self.Element] where S : Sequence
, Comparator : SortComparator
, Comparator == S.Element, Self.Element == Comparator.Compared
an array of the elements sorted using comparators
.
comparators
an array of comparators used to compare elements. The first comparator specifies the primary comparator to be used in sorting the sequence’s elements. Any subsequent comparators are used to further refine the order of elements with equal values.