C# Class Aqueduct.Extensions.Inflector

Summary for the Inflector class
Mostrar archivo Open project: aqueduct/Aqueduct.SitecoreLib

Public Methods

Method Description
AddOrdinalSuffix ( this number ) : string

Adds the ordinal suffix.

AddUnderscores ( this pascalCasedWord ) : string

Adds the underscores.

ConvertUnderscoresToDashes ( this underscoredWord ) : string

Converts the underscores to dashes.

MakeInitialCaps ( this word ) : string

Makes the initial caps.

MakeInitialLowerCase ( this word ) : string

Makes the initial lower case.

MakePlural ( this word ) : string

Makes the plural.

MakeSingular ( this word ) : string

Makes the singular.

ToCamelCase ( this lowercaseAndUnderscoredWord ) : string

Converts the string to camel case.

ToHumanCase ( this lowercaseAndUnderscoredWord ) : string

Converts the string to human case.

ToPascalCase ( this lowercaseAndUnderscoredWord ) : string

Converts the string to pascal case.

ToPascalCase ( this text, bool removeUnderscores ) : string

Converts text to pascal case...

ToProper ( this sourceString ) : string

Convert string to proper case

ToTitleCase ( this word ) : string

Converts the string to title case.

Private Methods

Method Description
AddIrregularRule ( string singular, string plural ) : void

Adds the irregular rule.

AddPluralRule ( string rule, string replacement ) : void

Adds the plural rule.

AddSingularRule ( string rule, string replacement ) : void

Adds the singular rule.

AddUnknownCountRule ( string word ) : void

Adds the unknown count rule.

ApplyRules ( IList rules, string word ) : string

Applies the rules.

Inflector ( ) : System

Initializes the Inflector class.

Method Details

AddOrdinalSuffix() public static method

Adds the ordinal suffix.
public static AddOrdinalSuffix ( this number ) : string
number this The number.
return string

AddUnderscores() public static method

Adds the underscores.
public static AddUnderscores ( this pascalCasedWord ) : string
pascalCasedWord this The pascal cased word.
return string

ConvertUnderscoresToDashes() public static method

Converts the underscores to dashes.
public static ConvertUnderscoresToDashes ( this underscoredWord ) : string
underscoredWord this The underscored word.
return string

MakeInitialCaps() public static method

Makes the initial caps.
public static MakeInitialCaps ( this word ) : string
word this The word.
return string

MakeInitialLowerCase() public static method

Makes the initial lower case.
public static MakeInitialLowerCase ( this word ) : string
word this The word.
return string

MakePlural() public static method

Makes the plural.
public static MakePlural ( this word ) : string
word this The word.
return string

MakeSingular() public static method

Makes the singular.
public static MakeSingular ( this word ) : string
word this The word.
return string

ToCamelCase() public static method

Converts the string to camel case.
public static ToCamelCase ( this lowercaseAndUnderscoredWord ) : string
lowercaseAndUnderscoredWord this The lowercase and underscored word.
return string

ToHumanCase() public static method

Converts the string to human case.
public static ToHumanCase ( this lowercaseAndUnderscoredWord ) : string
lowercaseAndUnderscoredWord this The lowercase and underscored word.
return string

ToPascalCase() public static method

Converts the string to pascal case.
public static ToPascalCase ( this lowercaseAndUnderscoredWord ) : string
lowercaseAndUnderscoredWord this The lowercase and underscored word.
return string

ToPascalCase() public static method

Converts text to pascal case...
public static ToPascalCase ( this text, bool removeUnderscores ) : string
text this The text.
removeUnderscores bool if set to true [remove underscores].
return string

ToProper() public static method

Convert string to proper case
public static ToProper ( this sourceString ) : string
sourceString this The source string.
return string

ToTitleCase() public static method

Converts the string to title case.
public static ToTitleCase ( this word ) : string
word this The word.
return string