Expand description
The order of the in-app picker’s entries: by which column, up or down, folders first or among the files, names read naturally.
use std::cmp::Ordering;
use egui_pop_api::files::sort::{PickerSort, SortColumn, natural_cmp};
assert_eq!(natural_cmp("IMG_9.cr3", "IMG_10.cr3"), Ordering::Less);
let newest = PickerSort::default().click(SortColumn::Modified);
assert_eq!(newest.as_text(), "-modified");
assert_eq!(PickerSort::parse("-modified"), Some(newest));Structs§
- Picker
Sort - The order of the picker’s entries. A listing always has one: unlike the data table’s, a header’s click goes up and down, never to no order.
Enums§
- Sort
Column - What the picker’s and the file browser’s entries are sorted by.
Functions§
- natural_
cmp - Compares names as people read them: a run of digits is a number
(
IMG_9beforeIMG_10), and case does not matter. Names that read the same (aandA,01and1) take the order of their characters, so that this is a total order. It compares characters, not a language’s collation:écomes afterz.