snakeCase
Converts a string to snake_case. Handles camelCase, PascalCase, kebab-case, spaces, and mixed formats.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
str | string | The string to convert |
Returns
Section titled “Returns”string — String in snake_case
Examples
Section titled “Examples”Convert camelCase to snake_case
Section titled “Convert camelCase to snake_case”Converts a camelCase string to snake_case.
Convert kebab-case to snake_case
Section titled “Convert kebab-case to snake_case”Also handles kebab-case and other formats.
