Feature request: Use natural/human order for sorting ports
Lexicographical sorting is very unintuitive when the sorted strings contain numbers >= 10. For example, the numbers 1, 2, 11 and 12 would lexicographically sort to: 1 11 12 2
Here's an example how this looks in helvum with an audio interface with 18 input ports:
The solution is probably to use natural/human order, which would sort the ports as you would expect capture_Aux0 to capture_Aux17.
The easiest way to do this would be to use one of the many crates that implement this:
name | monthly DLs | used in crates | license | last updated |
---|---|---|---|---|
natord | 59837 | 74 | MIT | 2015 |
lexical-sort | 47203 | 80 | MIT/Apache | 2020 |
human-sort | 11629 | 29 | MIT | 2019 |
human_name | 3782 | 1 | Apache 2.0 | 2024 |
numeric-sort | 597 | 0 | MIT/Apache | 2024 |
humanesort | 33 | 1 | MIT | 2017 |
humnum | 29 | 1 | Apache 2.0 | 2023 |
Edited by Benno Straub