I currently have code that accepts file names and sorts them differently (region-sensitive natural sort, case-insensitive ASCII-bit type, date modified, etc.), for example, for locale-sensitive natural The varieties he uses are:
Collections.sort(files, new Comparator<File>() { @Override public int compare(File f1, File f2) { return NaturalComparator.compareNatural(collator, f1.getName(), f2.getName()); } });
I would like to know how to make it ignore the word "the" at the beginning of the file name, so instead of ordering such files:
Apple
Carrot
Banana
He orders them as follows:
Apple
Banana
Carrot
source share