Comment

Comment by AdieuToLogic

> I don't want to put leading zeroes before every all the single digit numbers in my file names.

> ... it would be great if I could just trust that every device will understand numbers.

Strings are not numbers, even if some part of their content "looks like a number."

> I will add that I'm plenty "smart" enough to understand that "10" comes before "9" in a strictly alphabetical sense, and I still want my file managers to sort "9" before "10".

Problem is, this is your preference for a specific situation. Which may not be another person's preference in the same situation nor yours in a different situation.

So what are programs to do?

Display strings in a consistent, documented, manner. Which is lexicographical ordering in all cases lacking meta-data to indicate otherwise.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton