dependabit / utils/src / capitalize
Function: capitalize()
ts
function capitalize(str): string;Defined in: packages/utils/src/string.ts:16
Capitalizes the first letter of a string.
Parameters
| Parameter | Type | Description |
|---|---|---|
str | string | The string to capitalize. |
Returns
string
The capitalized string.
Example
ts
capitalize('hello'); // 'Hello'