Welcome Guest, Not a member yet? Register   Sign In
Inflector bug fix in singular()
#1

[eluser]Unknown[/eluser]
Currently, singular() results in the following:

horses -> hors
bases -> bas

I recommend the following code change in the singular() function:

Code:
$last3 = substr($str, -3);
$last4 = substr($str, -4);

if ($last3 == 'ies')
{
...
}
elseif ($last4 == 'sses')
{
...
}

Those few line changes fix the singular() function.


Messages In This Thread
Inflector bug fix in singular() - by El Forum - 10-06-2009, 10:27 AM
Inflector bug fix in singular() - by El Forum - 10-06-2009, 12:57 PM
Inflector bug fix in singular() - by El Forum - 10-06-2009, 02:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB