/CaseConversions

Easily convert strings into various casing styles: camelCase, PascalCase, lower_snake_case, _underscoreCamelCase.

Primary LanguageC#MIT LicenseMIT

CaseConversions

travis
nuget-release
github-release
nuget-dls

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.

API

// 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);

Installation and Usage

Recommended: Install the package via NuGet console.

Install-Package Andeart.CaseConversions

Optionally, you can instead download the latest release from the Github Releases tab.

Feedback and Contribution

Please feel free to send in a Pull Request, or drop me an email. Cheers!