
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Minerals.StringCases
Advanced tools
Optimized NuGet package with minimum memory allocation designed to help you convert strings to name cases such as Pascal, Camel, Kebab, Snake, Macro, Train and Title
Optimized NuGet package with minimum memory allocation designed to help you convert strings to names cases such as Pascal, Camel, Kebab, Snake, Macro, Train and Title.
Add the Minerals.StringCases nuget package to your C# project using the following methods:
<PackageReference Include="Minerals.StringCases" Version="0.2.2" />
dotnet add package Minerals.StringCases
using Minerals.StringCases;
string sampleText = " _ example Variable - - Name 321";
string pascalCase = sampleText.ToPascalCase();
// ExampleVariableName321
string camelCase = sampleText.ToCamelCase();
// exampleVariableName321
string underscoreCamelCase = sampleText.ToUnderscoreCamelCase();
// _exampleVariableName321
string kebabCase = sampleText.ToKebabCase();
// example-variable-name-321
string snakeCase = sampleText.ToSnakeCase();
// example_variable_name_321
string macroCase = sampleText.ToMacroCase();
// EXAMPLE_VARIABLE_NAME_321
string trainCase = sampleText.ToTrainCase();
// Example-Variable-Name-321
string titleCase = sampleText.ToTitleCase();
// Example Variable Name 321
Here is a comparison of the speed and amount of memory allocation with the most popular NuGet package similar to Minerals.StringCases version 0.2.0 - CaseExtesions version 1.1.0.
String used to perform the comparison:
string sampleText = " _ example Variable - - Name 321";
BenchmarkDotNet v0.13.12, Windows 10 (10.0.19045.4412/22H2/2022Update)
AMD Ryzen 5 2600, 1 CPU, 12 logical and 6 physical cores
.NET SDK 8.0.301
[Host] : .NET 8.0.6 (8.0.624.26715), X64 RyuJIT AVX2
Job-KUHBVV : .NET 8.0.6 (8.0.624.26715), X64 RyuJIT AVX2
Runtime=.NET 8.0
| Method | Mean | Error | StdDev | Gen0 | Allocated |
|---|---|---|---|---|---|
| PascalCase_Minerals_StringCases | 158.4 ns | 0.95 ns | 0.79 ns | 0.0343 | 144 B |
| CamelCase_Minerals_StringCases | 167.4 ns | 1.94 ns | 1.72 ns | 0.0343 | 144 B |
| SnakeCase_Minerals_StringCases | 182.4 ns | 0.71 ns | 0.63 ns | 0.0362 | 152 B |
| KebabCase_Minerals_StringCases | 196.0 ns | 1.75 ns | 1.55 ns | 0.0362 | 152 B |
| TrainCase_Minerals_StringCases | 206.1 ns | 2.62 ns | 2.46 ns | 0.0362 | 152 B |
| - | - | - | - | - | - |
| PascalCase_CaseExtensions | 505.9 ns | 1.83 ns | 1.71 ns | 0.0973 | 408 B |
| KebabCase_CaseExtensions | 506.1 ns | 1.68 ns | 1.49 ns | 0.0992 | 416 B |
| CamelCase_CaseExtensions | 520.6 ns | 4.91 ns | 4.59 ns | 0.0973 | 408 B |
| SnakeCase_CaseExtensions | 525.1 ns | 3.05 ns | 2.55 ns | 0.0992 | 416 B |
| TrainCase_CaseExtensions | 527.3 ns | 2.47 ns | 2.06 ns | 0.0992 | 416 B |
We use SemVer for versioning. For the versions available, see the branches on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Optimized NuGet package with minimum memory allocation designed to help you convert strings to name cases such as Pascal, Camel, Kebab, Snake, Macro, Train and Title
We found that minerals.stringcases demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.