I\'m looking for an algorithm that sorts strings similar to the way files (and folders) are sorted in Windows Explorer. It seems that numeric values in strings are taken int
Have a look at
http://www.interact-sw.co.uk/iangblog/2007/12/13/natural-sorting
for some source code.
This is a try to implement it in Java:
Java - Sort Strings like Windows Explorer
In short it splits the two Strings to compare in Letter - Digit Parts and compares this parts in a specific way to achieve this kind of sorting.
It's called "natural sort order". Jeff had a pretty extensive blog entry on it a while ago, which describes the difficulties you might overlook and has links to several implementations.
I also posted a related question with additional hints and pitfalls:
Sorting strings is much harder than you thought
There is StrCmpLogicalW, but it's only available starting with Windows XP and only implemented as Unicode.
Some background information: http://www.siao2.com/2006/10/01/778990.aspx
I posted code (C#) and a description of the algorithm here:
Natural Sort Order in C#