Messerli.ChangeCase 1.1.0

Install-Package Messerli.ChangeCase -Version 1.1.0
dotnet add package Messerli.ChangeCase --version 1.1.0
<PackageReference Include="Messerli.ChangeCase" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Messerli.ChangeCase --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Messerli.ChangeCase, 1.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Messerli.ChangeCase as a Cake Addin
#addin nuget:?package=Messerli.ChangeCase&version=1.1.0

// Install Messerli.ChangeCase as a Cake Tool
#tool nuget:?package=Messerli.ChangeCase&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Messerli.ChangeCase

Transform a string between different casing styles like: camelCase, PascalCase, CONSTANT_CASE and others handling old style abbrevations correctly

Build Licence: MIT Licence: Apache

Packages

NuGet package

Usage

using Messerli.ChangeCase

Sample usage:

var camelCase = "snake_case".ToCamelCase() // => snakeCase

Use as Method Group

IEnumerable<string> names = new[] { "PascalCase", "camelCase", "snake_case", "UPPER_SNAKE_CASE" };

var namesInPascalCase = names
    .Select(StringCaseExtensions.ToPascalCase);

ToPascalCase()

Pascal Case

"PascalCase".ToPascalCase(); // => PascalCase
"camelCase".ToPascalCase(); // => CamelCase
"snake_case".ToPascalCase(); // => SnakeCase
"UPPER_SNAKE_CASE".ToPascalCase(); // => UpperSnakeCase
"HTTPConnection".ToPascalCase(); // => HttpConnection
"HTML".ToPascalCase(); // => Html

ToCamelCase()

Camel case

"PascalCase".ToCamelCase(); // => pascalCase
"camelCase".ToCamelCase(); // => camelCase
"snake_case".ToCamelCase(); // => snakeCase
"UPPER_SNAKE_CASE".ToCamelCase(); // => upperSnakeCase
"HTTPConnection".ToCamelCase(); // => httpConnection
"HTML".ToCamelCase(); // => html

ToSnakeCase()

Snake case

"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

ToUpperSnakeCase()

Upper Snake case

"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

ToKebabCase()

Kebab case

"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
  • .NETStandard 2.0

    • Funcky (>= 2.4.0 && < 3.0.0)
  • net5.0

    • Funcky (>= 2.4.0 && < 3.0.0)

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Messerli.ChangeCase:

Package Downloads
Messerli.LinqToRest

A LINQ QueryProvider that uses a REST API as its data source.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 117 9/7/2021
1.0.0 356 4/1/2021