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

TryToSingular() public method

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