Capitalizes the first letter of a string if there is one.
name | type | description |
---|---|---|
str | string |
The string to capitalize. |
A new string, same as the first, but with the first letter capitalized.
UppercaseFirst('abc');
// returns 'Abc'
UppercaseFirst('the happy family');
// returns 'The happy family'
UppercaseFirst('');
// returns ''