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

sorted(using:)

Returns the elements of the sequence, sorted using the given comparator to compare elements.

Declaration 宣言

func sorted<Comparator>(using comparator: Comparator) -> [Self.Element] where Comparator : SortComparator, Self.Element == Comparator.Compared

Return Value 戻り値

an array of the elements sorted using comparator.

Parameters パラメータ

comparator

the comparator to use in ordering elements