Closed
Description
I like the library but it add a value if you can include Name Casing (I call it like that), along with TitleCase. The idea is to change Double Barrel name and name like O'Neil
to be properly cased. I wrote a novice function for it using Humanizer itself
public static string ToNameCase(string name)
{
string x = name.Replace("-", " #7# " ).Replace("'", " $7$ ");
x = x.ToLower().Transform(To.TitleCase);
return x.Replace(" #7# ", "-").Replace(" $7$ ", "'");
}
It does both, but I am not sure how to improve it further, my idea is to write it in Regular expression for better results, but for now it works.
Metadata
Metadata
Assignees
Labels
No labels