Skip to content

upperCase

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

string(以空格分隔的单词)转换为大写。

¥Converts string, as space separated words, to upper case.

新增于

¥Since

4.0.0

参数

¥Arguments

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

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

返回

¥Returns

(字符串):返回大写字符串。

¥(string): Returns the upper cased string.

示例

¥Example

js
_.upperCase('--foo-bar');
// => 'FOO BAR'

_.upperCase('fooBar');
// => 'FOO BAR'

_.upperCase('__foo_bar__');
// => 'FOO BAR'

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