主题
capitalize
js
_.capitalize([string=''])
将 string
的第一个字符转换为大写,其余字符转换为小写。
¥Converts the first character of string
to upper case and the remaining to lower case.
新增于
¥Since
3.0.0
参数
¥Arguments
[string='']
(字符串):要转换的字符串。¥
[string='']
(string): The string to capitalize.
返回
¥Returns
(字符串):返回大写字符串。
¥(string): Returns the capitalized string.
示例
¥Example
js
_.capitalize('FRED');
// => 'Fred'