Humanizer.InflectorExtensions
InflectorExtensions Class
Inflector extensions
public static class InflectorExtensions
Inheritance System.Object → InflectorExtensions
Methods
InflectorExtensions.Camelize(this string) Method
Same as Pascalize except that the first character is lower case
public static string Camelize(this string input);
Parameters
input System.String
Returns
InflectorExtensions.Dasherize(this string) Method
Replaces underscores with dashes in the string
public static string Dasherize(this string underscoredWord);
Parameters
underscoredWord System.String
Returns
InflectorExtensions.Hyphenate(this string) Method
Replaces underscores with hyphens in the string
public static string Hyphenate(this string underscoredWord);
Parameters
underscoredWord System.String
Returns
InflectorExtensions.Kebaberize(this string) Method
Separates the input words with hyphens and all the words are converted to lowercase
public static string Kebaberize(this string input);
Parameters
input System.String
Returns
InflectorExtensions.Pascalize(this string) Method
By default, pascalize converts strings to UpperCamelCase also removing underscores
public static string Pascalize(this string input);
Parameters
input System.String
Returns
InflectorExtensions.Pluralize(this string, bool) Method
Pluralizes the provided input considering irregular words
public static string Pluralize(this string word, bool inputIsKnownToBeSingular=true);
Parameters
word System.String
Word to be pluralized
inputIsKnownToBeSingular System.Boolean
Normally you call Pluralize on singular words; but if you're unsure call it with false
Returns
InflectorExtensions.Singularize(this string, bool, bool) Method
Singularizes the provided input considering irregular words
public static string Singularize(this string word, bool inputIsKnownToBePlural=true, bool skipSimpleWords=false);
Parameters
word System.String
Word to be singularized
inputIsKnownToBePlural System.Boolean
Normally you call Singularize on plural words; but if you're unsure call it with false
skipSimpleWords System.Boolean
Skip singularizing single words that have an 's' on the end
Returns
InflectorExtensions.Titleize(this string) Method
Humanizes the input with Title casing
public static string Titleize(this string input);
Parameters
input System.String
The string to be titleized
Returns
InflectorExtensions.Underscore(this string) Method
Separates the input words with underscore
public static string Underscore(this string input);
Parameters
input System.String
The string to be underscored