Skip to content

toLower ​

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

将 string 作为一个整体转换为小写,就像 String#toLowerCase 一样。

¥Converts string, as a whole, to lower case just like String#toLowerCase.

新增于 ​

¥Since

4.0.0

参数 ​

¥Arguments

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

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

返回 ​

¥Returns

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

¥(string): Returns the lower cased string.

示例 ​

¥Example

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

_.toLower('fooBar');
// => 'foobar'

_.toLower('__FOO_BAR__');
// => '__foo_bar__'

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