Skip to content

startCase

js
_.startCase([string=''])

string 转换为 开始案例

¥Converts string to start case.

新增于

¥Since

3.1.0

参数

¥Arguments

  1. [string=''] (字符串):要去毛刺的字符串。

    ¥[string=''] (string): The string to convert.

返回

¥Returns

(字符串):返回起始大小写字符串。

¥(string): Returns the start cased string.

示例

¥Example

js
_.startCase('--foo-bar--');
// => 'Foo Bar'

_.startCase('fooBar');
// => 'Foo Bar'

_.startCase('__FOO_BAR__');
// => 'FOO BAR'

Lodash v4.17 中文网 - 粤ICP备13048890号