mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 15:15:45 +07:00
pluralize in upper case (IDEA-78999)
This commit is contained in:
@@ -756,12 +756,12 @@ public class StringUtil {
|
||||
return suggestion + "ren";
|
||||
}
|
||||
|
||||
if (endsWithChar(suggestion, 's') || endsWithChar(suggestion, 'x') || suggestion.endsWith("ch")) {
|
||||
if (endsWithIgnoreCase(suggestion, "s") || endsWithIgnoreCase(suggestion, "x") || endsWithIgnoreCase(suggestion, "ch")) {
|
||||
return suggestion + "es";
|
||||
}
|
||||
|
||||
int len = suggestion.length();
|
||||
if (endsWithChar(suggestion, 'y') && len > 1 && !isVowel(suggestion.charAt(len - 2))) {
|
||||
if (endsWithIgnoreCase(suggestion, "y") && len > 1 && !isVowel(toLowerCase(suggestion.charAt(len - 2)))) {
|
||||
return suggestion.substring(0, len - 1) + "ies";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user