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,以后要加深学习。
posted @ 2016-07-19 09:46  拳拳  阅读(1311)  评论(0编辑  收藏  举报