IDEA-62339 Incorrect singularization "cookies -> cooky". Should convert to "cookie"

This commit is contained in:
peter.gromov
2010-12-14 20:51:34 +03:00
parent 1614d26e89
commit b84653c4d1
@@ -1148,6 +1148,10 @@ public class StringUtil {
}
if (name.endsWith("ies")) {
if (name.endsWith("cookies") || name.endsWith("Cookies")) {
return name.substring(0, name.length() - "ookies".length()) + "ookie";
}
return name.substring(0, name.length() - 3) + "y";
}