/**
* Capitalizes the first letter of a string.
*
* @paramstr - The string to capitalize.
* @returns The capitalized string.
*
* @example
* capitalize('hello'); // 'Hello'
*/exportfunctioncapitalize(str) {
if (!str)
return'';
return str[0].toUpperCase() + str.slice(1);
}