First of all thanks for your work.
We use it in MaterialAudiobookPlayer to compare file names. But recently a problem came up.
When a String start with zeros, the ordering gets wrong. I wrote a small unit test to demonstrate it here.
String first = "00 I";
String second = "01 I";
assertTrue(NaturalOrderComparator.naturalCompare(first, second) < 0);
This one fails.
First of all thanks for your work.
We use it in MaterialAudiobookPlayer to compare file names. But recently a problem came up.
When a String start with zeros, the ordering gets wrong. I wrote a small unit test to demonstrate it here.
This one fails.