Contains extension methods for dehumanizing strings.
public static class StringDehumanizeExtensionsInheritance System.Object → StringDehumanizeExtensions
Converts a humanized string back to PascalCase format by removing spaces and capitalizing each word.
public static string Dehumanize(this string input);input System.String
The string to be dehumanized. Must not be null.
System.String
A PascalCase string with all spaces removed and each word capitalized.
If the input is already in PascalCase (contains no spaces), it is returned unchanged.
"some string".Dehumanize() => "SomeString"
"Some String".Dehumanize() => "SomeString"
"Some string".Dehumanize() => "SomeString"
"SomeStringAndAnotherString".Dehumanize() => "SomeStringAndAnotherString" // Already dehumanized, returned unchangedThis method reverses the humanization process by: 1. Splitting the input on spaces 2. Humanizing each word (to handle any edge cases) 3. Pascalizing each word (capitalizing first letter) 4. Removing all spaces This is the inverse operation of Humanize(this string).