Formats string value into hyphen case format. For example "ToHyphenCase" will be formated into "to-hyphen-case".
ToCamelCase
Formats string value into camel case format. For example "ToCamelCase" will be formated into "toCamelCase".
ToSnakeCase
Formats string value into snake case format. For example "ToSnakeCase" will be formated into "to_snake_case".
Contains
Returns a value indicating whether a specified string occurs within this string, using the specified comparison rules. Method could be useful to projects prior to .net standard 2.1. Similar method added to string in .net standard 2.1.
Replace
Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string using provided comparison rule. Method could be useful to projects prior to .net standard 2.1. Similar method added to string in .net standard 2.1.
var result = "ToHyphenCase".ToHyphenCase() // to-hyphen-case
var result = "ToCamelCase".ToCamelCase() // toCamelCase
var result = "ToSnakeCase".ToSnakeCase() // to_snake_case
var result = "QwErTy".Contains("wert", StringComparison.Ordinal) // false
var result = "QwErTy".Contains("wert", StringComparison.OrdinalIgnoreCase) // true
var result = "QwErTyQwErTy".Replace("WeR", "123", StringComparison.Ordinal) // QwErTyQwErTy
var result = "QwErTyQwErTy".Replace("WeR", "123", StringComparison.OrdinalIgnoreCase) // Q123TyQ123Ty