Exclude little words of 'ee' to 'oo' plural transformation
The plural form of 'bee' and 'fee' are not 'foo' and 'boo'. In general words smaller than 3 letters doesn't change to a 'oo' form.
This commit is contained in:
parent
2872f839ad
commit
6453c1a018
@ -188,7 +188,7 @@ class StringUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert teeth to tooth, feet to foot
|
// Convert teeth to tooth, feet to foot
|
||||||
if (false !== ($pos = strpos($plural, 'ee'))) {
|
if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3) {
|
||||||
return substr_replace($plural, 'oo', $pos, 2);
|
return substr_replace($plural, 'oo', $pos, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user