Aqueduct.Extensions.Inflector.ApplyRules C# (CSharp) Method

ApplyRules() private static method

Applies the rules.
private static ApplyRules ( IList rules, string word ) : string
rules IList The rules.
word string The word.
return string
        private static string ApplyRules(IList<InflectorRule> rules, string word)
        {
            string result = word;
            if (!_uncountables.Contains(word.ToLower()))
            {
                for (int i = rules.Count - 1; i >= 0; i--)
                {
                    string currentPass = rules[i].Apply(word);
                    if (currentPass != null)
                    {
                        result = currentPass;
                        break;
                    }
                }
            }
            return result;
        }