C# Class Raven.Light.Util.Inflector

The Inflector class transforms words from one form to another. For example, from singular to plural.
Exibir arquivo Open project: hibernating-rhinos/Raven.Light

Public Methods

Method Description
Capitalize ( string word ) : string

Capitalizes a word.

Pluralize ( string word ) : string

Return the plural of a word.

Singularize ( string word ) : string

Return the singular of a word.

Private Methods

Method Description
AddIrregular ( string singular, string plural ) : void
AddPlural ( string rule, string replacement ) : void
AddSingular ( string rule, string replacement ) : void
AddUncountable ( string word ) : void
ApplyRules ( IList rules, string word ) : string
Inflector ( ) : System.Collections

Method Details

Capitalize() public static method

Capitalizes a word.
public static Capitalize ( string word ) : string
word string The word to be capitalized.
return string

Pluralize() public static method

Return the plural of a word.
public static Pluralize ( string word ) : string
word string The singular form
return string

Singularize() public static method

Return the singular of a word.
public static Singularize ( string word ) : string
word string The plural form
return string