-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Would it be possible to sort some non-English words please?
I can't send any pull request but this should work into LineOperations.java:
import java.text.Collator;
import java.util.Locale;
// line 149
Comparator<String> comparator = null;
Collator collator = null;
if (descending) {
if (matchCase) {
comparator = REVERSE_STRING_COMPARATOR;
} else {
comparator = REVERSE_STRING_COMPARATOR_CASE_INSENSITIVE;
}
} else {
if (matchCase) {
Locale locale = new Locale("fr_FR");
collator = Collator.getInstance(locale);
} else {
comparator = String.CASE_INSENSITIVE_ORDER;
}
}
if (isRemoveDuplicateLines()) {
SortedSet<String> uniqifySet = new TreeSet<String>(matchCase ? null : String.CASE_INSENSITIVE_ORDER);
uniqifySet.addAll(Arrays.asList(linesText));
linesText = uniqifySet.toArray(new String[0]);
}
if (comparator == null) {
Arrays.sort(linesText, collator);
} else {
Arrays.sort(linesText, comparator);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels