Urara-Blog/node_modules/.pnpm-store/v3/files/c7/4ccc2fbc9a54279ce53477cf836e32b587bd73c01c3891a3ae5c846772eabe1b051ffad164ef5c2f495b41296ea87dbfb8f8ded4979e4553623c87915024db
2022-08-14 01:14:53 +08:00

22 lines
459 B
Text

/**
* @fileoverview Utilities to operate on strings.
* @author Stephen Wade
*/
"use strict";
/**
* Converts the first letter of a string to uppercase.
* @param {string} string The string to operate on
* @returns {string} The converted string
*/
function upperCaseFirst(string) {
if (string.length <= 1) {
return string.toUpperCase();
}
return string[0].toUpperCase() + string.slice(1);
}
module.exports = {
upperCaseFirst
};