StringCasing 1.3.1

dotnet add package StringCasing --version 1.3.1
                    
NuGet\Install-Package StringCasing -Version 1.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StringCasing" Version="1.3.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StringCasing" Version="1.3.1" />
                    
Directory.Packages.props
<PackageReference Include="StringCasing">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StringCasing --version 1.3.1
                    
#r "nuget: StringCasing, 1.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StringCasing@1.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StringCasing&version=1.3.1
                    
Install as a Cake Addin
#tool nuget:?package=StringCasing&version=1.3.1
                    
Install as a Cake Tool

StringCasing

High-performance string case conversion extensions for .NET. Source-only NuGet package — zero runtime dependencies.

Installation

dotnet add package StringCasing

Usage

using StringCasing;

"parseHTTPResponse".ToPascalCase();           // ParseHttpResponse
"parseHTTPResponse".ToCamelCase();            // parseHttpResponse
"parseHTTPResponse".ToKebabCase();            // parse-http-response
"parseHTTPResponse".ToSnakeCase();            // parse_http_response
"parseHTTPResponse".ToMacroCase();            // PARSE_HTTP_RESPONSE
"parseHTTPResponse".ToCobolCase();            // PARSE-HTTP-RESPONSE
"parseHTTPResponse".ToTrainCase();            // Parse-Http-Response
"parseHTTPResponse".ToTitleCase();            // Parse Http Response
"parseHTTPResponse".ToTitleSnakeCase();       // Parse_Http_Response
"parseHTTPResponse".ToDotCase();              // parse.http.response
"parseHTTPResponse".ToFlatCase();             // parsehttpresponse

Microsoft .NET naming convention

Two additional methods follow the Microsoft capitalization conventions, where two-letter acronyms stay fully uppercase:

"parseIOStream".ToDotNetPascalCase();   // ParseIOStream  (IO stays uppercase)
"parseIOStream".ToDotNetCamelCase();    // parseIOStream
"getDBConnection".ToDotNetPascalCase(); // GetDBConnection (DB stays uppercase)
"parseHTTPResponse".ToDotNetPascalCase(); // ParseHttpResponse (HTTP is 4 letters, gets title-cased)

Performance

Built for performance with zero unnecessary allocations:

  • ref struct WordSplitter for zero-allocation word boundary detection
  • stackalloc char[256] output buffer with ArrayPool<char> fallback
  • ReadOnlySpan<char> slicing — no intermediate string arrays
  • No LINQ, no StringBuilder, no Regex

Source-only package

This package ships as source code, not a compiled assembly. The .cs files are compiled directly into your project. The extension class is internal, so it won't pollute your public API.

License

This project is licensed under the MIT License.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.1 75 3/28/2026
1.3.0 38 3/28/2026
1.2.2 39 3/28/2026
1.2.1 57 3/26/2026
1.2.0 43 3/26/2026
1.1.2 36 3/26/2026
1.1.1 40 3/26/2026
1.1.0 37 3/26/2026
1.0.1 38 3/26/2026
1.0.0 40 3/26/2026