2026-05-31 13:54:31 +02:00

20 lines
629 B
JavaScript

import { upperFirst as upperFirst$1 } from "../../string/upperFirst.mjs";
import { toString } from "../util/toString.mjs";
//#region src/compat/string/upperFirst.ts
/**
* Converts the first character of string to upper case.
*
* @param {string} str - The string that is to be changed
* @returns {string} - The converted string.
*
* @example
* const convertedStr1 = upperFirst('fred') // returns 'Fred'
* const convertedStr2 = upperFirst('Fred') // returns 'Fred'
* const convertedStr3 = upperFirst('FRED') // returns 'FRED'
*/
function upperFirst(str) {
return upperFirst$1(toString(str));
}
//#endregion
export { upperFirst };