C# Class Aqueduct.Extensions.Inflector

Summary for the Inflector class
Afficher le fichier Open project: aqueduct/Aqueduct.SitecoreLib

Méthodes publiques

Méthode 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

Méthode 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 méthode

Adds the ordinal suffix.
public static AddOrdinalSuffix ( this number ) : string
number this The number.
Résultat string

AddUnderscores() public static méthode

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

ConvertUnderscoresToDashes() public static méthode

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

MakeInitialCaps() public static méthode

Makes the initial caps.
public static MakeInitialCaps ( this word ) : string
word this The word.
Résultat string

MakeInitialLowerCase() public static méthode

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

MakePlural() public static méthode

Makes the plural.
public static MakePlural ( this word ) : string
word this The word.
Résultat string

MakeSingular() public static méthode

Makes the singular.
public static MakeSingular ( this word ) : string
word this The word.
Résultat string

ToCamelCase() public static méthode

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

ToHumanCase() public static méthode

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

ToPascalCase() public static méthode

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

ToPascalCase() public static méthode

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].
Résultat string

ToProper() public static méthode

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

ToTitleCase() public static méthode

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