sortRange method
Sort a range of elements by compare
.
If compare
is omitted, the range is sorted according to the
natural ordering of the elements.
Implementation
void sortRange(int start, int end, [int Function(E a, E b)? compare]) {
RangeError.checkValidRange(start, end, length);
algorithms.quickSortBy<E, E>(
this, identity, compare ?? compareComparable, start, end);
}