CsvTableSorting extension

Sorting operations on CsvTable.

All sorts are stable and mutate the table in place; sortedBy returns a sorted copy instead. Nulls sort last regardless of direction (see CsvTable.compareValues).

on

Methods

sort(int compare(CsvRow a, CsvRow b)) → void

Available on CsvTable, provided by the CsvTableSorting extension

Sort with custom comparator (stable, in place).
sortBy(String column, {bool ascending = true}) → void

Available on CsvTable, provided by the CsvTableSorting extension

Sort by column name (stable, in place).
sortByIndex(int column, {bool ascending = true}) → void

Available on CsvTable, provided by the CsvTableSorting extension

Sort by column index (stable, in place).
sortByMultiple(List<(String, bool)> criteria) → void

Available on CsvTable, provided by the CsvTableSorting extension

Sort by multiple columns (stable, in place).
sortedBy(String column, {bool ascending = true}) CsvTable

Available on CsvTable, provided by the CsvTableSorting extension

Return a copy of this table sorted by column name; this table is left untouched.