sortBy

Sorts a range using the standard library sort by a publicly visible member variable or property of ElemntType!Range

sortBy
(
string member
alias less = "a < b"
Range
)
(
Range range
)

Examples

1 struct A {
2     int i;
3 }
4 auto a = [A(3), A(1), A(2)];
5 assert(a.sortBy!"i".equal([A(1), A(2), A(3)]));

Meta

Since

0.0.1