StringCaseExtensions extension

Extension to convert strings into different cases. Supports snake_case, camelCase, PascalCase, kebab-case, SCREAMING_SNAKE_CASE, Title Case, and Sentence case.

on

Methods

toCamelCase() String

Available on String, provided by the StringCaseExtensions extension

Converts string to camelCase. Example: "edit item""editItem"
toKebabCase() String

Available on String, provided by the StringCaseExtensions extension

Converts string to kebab-case. Example: "Edit Item""edit-item"
toPascalCase() String

Available on String, provided by the StringCaseExtensions extension

Converts string to PascalCase. Example: "edit item""EditItem"
toScreamingSnakeCase() String

Available on String, provided by the StringCaseExtensions extension

Converts string to SCREAMING_SNAKE_CASE. Example: "Edit Item""EDIT_ITEM"
toSentenceCase() String

Available on String, provided by the StringCaseExtensions extension

Converts string to Sentence case (capitalize only the first word). Example: "edit_item now""Edit item now"
toSnakeCase() String

Available on String, provided by the StringCaseExtensions extension

Converts string to snake_case. Example: "EditItem""edit_item"
toTitleCase() String

Available on String, provided by the StringCaseExtensions extension

Converts string to Title Case (capitalize every word). Example: "edit_item""Edit Item"