2 * @fileoverview Utilities to operate on strings.
9 * Converts the first letter of a string to uppercase.
10 * @param {string} string The string to operate on
11 * @returns {string} The converted string
13 function upperCaseFirst(string) {
14 if (string.length <= 1) {
15 return string.toUpperCase();
17 return string[0].toUpperCase() + string.slice(1);