toCamelCase
Each word is capitalised, the separators between words are dropped, and the first letter is lowered unless firstWordToLowerCase is false. With clean left on, anything that is not a letter or a digit is removed as well.
Word boundaries are the ones a regular expression sees, so spaces and hyphens separate words but an underscore does not: "user_first_name" comes back as "userfirstname", not "userFirstName".
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The string to convert. It must not be empty. |
|
|
|
Returns
string — the converted string.
Throws
Exception | Condition |
|---|---|
| the value is not a string, or is empty. |
Examples
Converting
See also
Source
This documentation was generated with AI (Claude) from the library's source code.