10 lines
238 B
TypeScript
10 lines
238 B
TypeScript
|
/**
|
||
|
* Capitalizes the first letter of a string.
|
||
|
*
|
||
|
* @param str the string to capitalize
|
||
|
* @returns the capitalized string
|
||
|
*/
|
||
|
export function capitalizeFirstLetter(str: string) {
|
||
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
||
|
}
|