Function itertools::sorted
[−]
[src]
pub fn sorted<I>(iterable: I) -> Vec<I::Item> where
I: IntoIterator,
I::Item: Ord,
Collect all the iterable's elements into a sorted vector in ascending order.
IntoIterator
enabled version of iterable.sorted()
.
use itertools::sorted; use itertools::assert_equal; assert_equal(sorted("rust".chars()), "rstu".chars());