Description
Converts a string to camelCase format by removing non-alphanumeric characters and capitalizing the first letter of each word except the first.Syntax
Parameters
Returns
Type: string The input string converted to camelCase format. Returnsnull if input is null.
Examples
Example 1: Basic Usage
Example 2: Converting Field Names
Example 3: Normalizing Property Names
Notes
- Returns
nullfornullinput - Removes all non-alphanumeric characters
- First character is always lowercase
- Subsequent words start with uppercase
- Useful for normalizing field names to JavaScript/JSON conventions
See Also
- text.upperCamelCase - Convert to UpperCamelCase (PascalCase)
- text.snakeCase - Convert to snake_case format
- text.capitalize - Capitalize first character only
Frequently Asked Questions
What separators does flex.text.camelCase recognize?
What separators does flex.text.camelCase recognize?
It recognizes spaces, hyphens, underscores, and transitions between lowercase and uppercase characters as word boundaries.
How is camelCase different from upperCamelCase?
How is camelCase different from upperCamelCase?
In
camelCase the first letter is lowercase (e.g., helloWorld), while upperCamelCase (PascalCase) capitalizes the first letter too (e.g., HelloWorld).