int (@NotNull CharSequence name1, @NotNull CharSequence name2, boolean isCaseSensitive) { int d = name1.length() - name2.length(); if (d != 0) return d; for (int i = 0; i < name1.length(); i++) { // com.intellij.openapi.util.text.StringUtil.compare(String,String,boolean) inconsistent d = StringUtil.compare(name1.charAt(i), name2.charAt(i), !isCaseSensitive); if (d != 0) return d; } return 0; }