upperFirst
Uppercase only the first character of a string while preserving the rest, a small helper for sentence and label formatting.
Usage
Uppercases only the first letter of a string, leaving the rest unchanged.
import { upperFirst } from '@movk/core'
upperFirst('foo bar') // => 'Foo bar'
upperFirst('FOO BAR') // => 'FOO BAR'
API
upperFirst(str: string): string
Parameters
str
string required
The string to convert.
Returns
string
Returns the string with the first letter uppercased.
Changelog
No recent changes