Humanizer.To
To Class
A portal to string transformation using IStringTransformer
public static class To
Inheritance System.Object → To
Properties
To.LowerCase Property
Changes the string to lower case
public static Humanizer.ICulturedStringTransformer LowerCase { get; }
Property Value
Example
"Sentence casing" -> "sentence casing"
To.SentenceCase Property
Changes the string to sentence case
public static Humanizer.ICulturedStringTransformer SentenceCase { get; }
Property Value
Example
"lower case statement" -> "Lower case statement"
To.TitleCase Property
Changes string to title case
public static Humanizer.ICulturedStringTransformer TitleCase { get; }
Property Value
Example
"INvalid caSEs arE corrected" -> "Invalid Cases Are Corrected"
To.UpperCase Property
Changes the string to upper case
public static Humanizer.ICulturedStringTransformer UpperCase { get; }
Property Value
Example
"lower case statement" -> "LOWER CASE STATEMENT"
Methods
To.Transform(this string, IStringTransformer[]) Method
Transforms a string using the provided transformers. Transformations are applied in the provided order.
public static string Transform(this string input, params Humanizer.IStringTransformer[] transformers);
Parameters
input System.String
transformers IStringTransformer[]
Returns
To.Transform(this string, CultureInfo, ICulturedStringTransformer[]) Method
Transforms a string using the provided transformers. Transformations are applied in the provided order.
public static string Transform(this string input, System.Globalization.CultureInfo culture, params Humanizer.ICulturedStringTransformer[] transformers);
Parameters
input System.String
culture System.Globalization.CultureInfo
transformers ICulturedStringTransformer[]