3 ms·
See also: ordering text with numbers in them. I've worked with several programs that present results as "Thing number 1" "Thing number 10" "Thing number 2"
by bloaf 9y ago
See also: ordering text with numbers in them.
I've worked with several programs that present results as
"Thing number 1"
"Thing number 10"
"Thing number 2"
...
Which IS of course alphabetical order, but it is also the wrong order for any user-facing list. This is most likely a symptom of prematurely string-ifying and passing around information as strings.
- jerrylives 9y agoGoogle, apparently the smartest tech company in the whole wide world, still hasn't figured this out for drive
- Spivak 9y agoAlphabetical order is annoying to get right, and really hard if you try to apply it strictly because you have to recognize Roman numerals as numbers.
- j_s 9y agoRaymond Chen's Old New Thing covered a similar issue, contrasting NTFS vs. Windows Explorer: https://blogs.msdn.microsoft.com/oldnewthing/20050617-10/?p=35293 https://blogs.msdn.microsoft.com/oldnewthing/20050617-10/?p=... He referenced Michael Kaplan's MSDN blog about how Windows Explorer sorts, which took me a while to find: http://archives.miloush.net/michkap/archive/2006/09/30/778345.html http://archives.miloush.net/michkap/archive/2006/09/30/77834... And there is a KB article about differences between Windows versions: https://support.microsoft.com/en-us/help/319827/the-sort-order-for-files-and-folders-whose-names-contain-numerals-is-d https://support.microsoft.com/en-us/help/319827/the-sort-ord... The function is available for use, StrCmpLogicalW: https://msdn.microsoft.com/en-us/library/windows/desktop/bb759947.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/bb7...