Appearance
StringCasingExtensions Class
Definition
Extension methods for case operations on the string datatype
- Namespace:
JASE.Extensions - Assembly:
JASE.Primitives.dll
Methods
| Name | Description |
|---|---|
string camelCase(string input) | Convert the input string to camelCase |
string CamelCase(string input) | Convert the input string to camelCase |
bool IsCamelCased(string input) | Returns see if the input string is in camelCase format |
bool IsPascalCase(string input) | Checks if string input is currently in PascalCase |
string kebabCase(string str) | Returns input string in kebab-case |
string KebabCase(string input) | Returns input string in kebab-case |
string PascalCase(string input) | PascalCase conversion with rules: - Non-alphanumerics are separators (skip them) - First letter of each token uppercased - Letter after a digit uppercased - Consecutive uppercase runs collapse to FirstUpper + rest lower, except the last uppercase before a lowercase is treated as the next word's start (e.g., SOMEOther -> SomeOther, CoolSP -> CoolSp, CIRC -> Circ) |
string ProperCase(string input) | Returns input string in Proper/Title case format using the CurrentCulture.TextInfo object |
string SentenceCase(string input) | Returns input string in Sentence Case format |
string SnakeCase(string input) | Returns input in snake_case syntax, often used in database columns and tables |
string StartCase(string input, bool acronymSupport = null) | Returns input formatted in Start Case with optional acronym support |
string TitleCase(string input, CultureInfo culture = null) | Returns input string in Title/Proper case format using the CurrentCulture.TextInfo object |