To Title Case
Converts a string to title case.
Category | Strings |
Author | Pol Gubau |
Since | 1.0.0 |
Last Updated | 2025-03-15 |
Type | Sync |
Compatibility | Universal |
Example
Input
toTitleCase('hello world')
Output:
'Hello World'
Return
Returns the title-cased string.
Type: string
Props
Name | Type | Default | Required | Description |
---|---|---|---|---|
str | string | null | Yes | The string to convert to title case. |
Notes
This function capitalizes the first letter of each word in the string.
Tags
- string
- titleCase
- conversion