CaseConversions lets you manipulate strings from one case-styling to another. The conversion is also smart about existing casing, periods, spaces, underscores, and any other punctuation marks in the input string.
For example, passing ca_seConv.ersi onTests
as an input to ToPascalCase()
returns CaSeConvErsiOnTests
.
// Converts text to camelCase.
string ToCamelCase (this string text);
// Converts text to PascalCase.
string ToPascalCase (this string text);
// Converts text to lower_snake_case.
string ToLowerSnakeCase (this string text);
// Converts text to _underscoreCamelCase.
string ToUnderscoreCamelCase (this string text);
Recommended: Install the package via NuGet console.
Install-Package Andeart.CaseConversions
Optionally, you can instead download the latest release from the Github Releases tab.
Please feel free to send in a Pull Request, or drop me an email. Cheers!