Transform a string between different casing styles like: camelCase, PascalCase, CONSTANT_CASE and others handling old style abbrevations correctly
using Messerli.ChangeCase
Sample usage:
var camelCase = "snake_case".ToCamelCase() // => snakeCase
IEnumerable<string> names = new[] { "PascalCase", "camelCase", "snake_case", "UPPER_SNAKE_CASE" };
var namesInPascalCase = names
.Select(StringCaseExtensions.ToPascalCase);
"PascalCase".ToPascalCase(); // => PascalCase
"camelCase".ToPascalCase(); // => CamelCase
"snake_case".ToPascalCase(); // => SnakeCase
"UPPER_SNAKE_CASE".ToPascalCase(); // => UpperSnakeCase
"HTTPConnection".ToPascalCase(); // => HttpConnection
"HTML".ToPascalCase(); // => Html
"PascalCase".ToCamelCase(); // => pascalCase
"camelCase".ToCamelCase(); // => camelCase
"snake_case".ToCamelCase(); // => snakeCase
"UPPER_SNAKE_CASE".ToCamelCase(); // => upperSnakeCase
"HTTPConnection".ToCamelCase(); // => httpConnection
"HTML".ToCamelCase(); // => html
"PascalCase".ToSnakeCase(); // => pascal_case
"camelCase".ToSnakeCase(); // => camel_case
"snake_case".ToSnakeCase(); // => snake_case
"UPPER_SNAKE_CASE".ToSnakeCase(); // => upper_snake_case
"HTTPConnection".ToSnakeCase(); // => http_connection
"HTML".ToSnakeCase(); // => html
"PascalCase".ToUpperSnakeCase(); // => PASCAL_CASE
"camelCase".ToUpperSnakeCase(); // => CAMEL_CASE
"snake_case".ToUpperSnakeCase(); // => SNAKE_CASE
"UPPER_SNAKE_CASE".ToUpperSnakeCase(); // => UPPER_SNAKE_CASE
"HTTPConnection".ToUpperSnakeCase(); // => HTTP_CONNECTION
"HTML".ToUpperSnakeCase(); // => HTML
"PascalCase".ToKebabCase(); // => pascal-case
"camelCase".ToKebabCase(); // => camel-case
"snake_case".ToKebabCase(); // => snake-case
"UPPER_SNAKE_CASE".ToKebabCase(); // => upper-snake-case
"HTTPConnection".ToKebabCase(); // => http-connection
"HTML".ToKebabCase(); // => html