The name sorting is poorly suited for human consumption. Because many files have some number in them, they are not in the expected order. See attached for my example.
Here is a more detailed discussion about it: https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/
I realize it may not be obvious to implement in Zig/C, since not even unicode aware one seems to not be available out of the box.
If you are willing to use an existing implementation, I've found it here: https://github.com/sourcefrog/natsort (in C, very permissive licence).
As a fun Advent of Code, I am playing with Zig now to see if it would be simpler to do here. No High hopes, though ^^
Many thanks for an already awesome utility !
The name sorting is poorly suited for human consumption. Because many files have some number in them, they are not in the expected order. See attached for my example.
Here is a more detailed discussion about it: https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/
I realize it may not be obvious to implement in Zig/C, since not even unicode aware one seems to not be available out of the box.
If you are willing to use an existing implementation, I've found it here: https://github.com/sourcefrog/natsort (in C, very permissive licence).
As a fun Advent of Code, I am playing with Zig now to see if it would be simpler to do here. No High hopes, though ^^
Many thanks for an already awesome utility !