Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Latest commit

 

History

History
24 lines (17 loc) · 464 Bytes

string_upper_first.md

File metadata and controls

24 lines (17 loc) · 464 Bytes

strings/stringUpperFirst

Upper cases the first letter in a string.

function stringUpperFirst(str: string): string

Args

str:string The string to transform.

Returns

The string with the first character upper cased.

Examples

import { stringUpperFirst } from 'utils/strings';

console.log(stringUpperFirst('foo'));     // Outputs: 'Foo'
console.log(stringUpperFirst('foo bar')); // Outputs: 'Foo bar'