lodash接触:string-capitalize

1、capitalize :

_.capitalize([string=''])

Capitalizes the first character of string.

参数

  1. [string=''] (string): The string to capitalize.

返回值

(string): Returns the capitalized string.

例子

_.capitalize('fred');
// => 'Fred'


今天看到了capitalize用法才知道lodash,以后要加深学习。
原文地址:https://www.cnblogs.com/perallina/p/5683580.html