Back to utils
UtilslowercaseFirstLetter
Converts the first letter of a string to lowercase while keeping the rest unchanged.
| Category: | Strings |
Usage
const input = 'HelloWorld'
const result = lowercaseFirstLetter(input)
console.log(result)
// Output: "helloWorld"
Type definition
/**
* Converts the first letter of a string to lowercase while keeping the rest unchanged.
*
* @param str - The input string.
* @returns The transformed string with the first letter in lowercase.
*/
export declare const lowercaseFirstLetter: (str: string) => string