Nothing Special   »   [go: up one dir, main page]

Skip to content

saquibmian/Saquib.Utils.Naming

Repository files navigation

Saquib.Utils.Naming

Contains a set of strategies for altering names to a casing style. Currently supported strategies include:

  • camelCase
  • PascalCase
  • snake_case
  • kebab-case
  • Train-Case
  • Title Case
  • Sentence case

Usage

Usage is as follows:

var strategy = new PascalCaseNamingStrategy();
var canonicalName = strategy.Apply( "last_modified_date" );
Assert.Equal( "LastModifiedDate", canonicalName );

You can also use the convenience extension methods, but you will not be able to configure the applied strategies (default options are used_). The convenience functions are memoized, so they can be called repeated on the same input with no performance penalty.

var converted = "lastModifiedDate".ToKebabCase();

About

Contains a set of strategies for altering names.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages