* Capitalizes the first character of `string`. * * @static * @memberOf _ * @category String * @param {string} [string=''] The string to capitalize. * @returns {string} Returns the capitalized string. * @example * * _.capitalize('fred'); * // => 'Fred
(string)
| 11598 | * // => 'Fred' |
| 11599 | */ |
| 11600 | function capitalize(string) { |
| 11601 | string = baseToString(string); |
| 11602 | return string && (string.charAt(0).toUpperCase() + string.slice(1)); |
| 11603 | } |
| 11604 | |
| 11605 | /** |
| 11606 | * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) |
nothing calls this directly
no test coverage detected