Capitalize
Capitalizes the first letter of a string.
Category | Strings |
Author | Pol Gubau |
Since | 1.0.0 |
Last Updated | 2025-03-15 |
Type | Sync |
Compatibility | Universal |
Example
Input
capitalize('hello world')
Output:
'Hello world'
Return
Returns the string with the first letter capitalized.
Type: string
Props
Name | Type | Default | Required | Description |
---|---|---|---|---|
str | string | null | Yes | The string to capitalize. |
Notes
This function only capitalizes the first letter of the string, leaving the rest intact.
Tags
- string
- capitalize
- conversion