ReviewR.Web.Infrastructure.Pluralizer.SuffixRule.TryToPlural C# (CSharp) Method

TryToPlural() public method

public TryToPlural ( string word, string &plural ) : bool
word string
plural string
return bool
            public bool TryToPlural(string word, out string plural)
            {
                if (word.EndsWith(_singularSuffix, StringComparison.OrdinalIgnoreCase))
                {
                    plural = word.Substring(0, word.Length - _singularSuffix.Length) + _pluralSuffix;
                    return true;
                }
                else
                {
                    plural = null;
                    return false;
                }
            }