Beispiel #1
0
 public static string Ordinalize(this int number)
 {
     return(Inflector.Ordanize(number, number.ToString()));
 }
Beispiel #2
0
 public static string Ordinalize(this string numberString)
 {
     return(Inflector.Ordanize(int.Parse(numberString), numberString));
 }
Beispiel #3
0
 public static string Camelize(this string lowercaseAndUnderscoredWord)
 {
     return(Inflector.Uncapitalize(
                Inflector.Pascalize(lowercaseAndUnderscoredWord)));
 }
Beispiel #4
0
 public static string Titleize(this string word)
 {
     return(Regex.Replace(Inflector.Humanize(
                              Underscore(word)), @"\b([a-z])",
                          match => match.Captures[0].Value.ToUpper()));
 }
Beispiel #5
0
 public static string Singularize(this string word)
 {
     return(Inflector.ApplyRules(Inflector.Singulars, word));
 }
Beispiel #6
0
 public static string Pluralize(this string word)
 {
     return(Inflector.ApplyRules(Inflector.Plurals, word));
 }