Lodash

是一个一致性、模块化、高性能的 JavaScript 实用工具库。

“String” Methods

_.toUpper([string=''])

转换整个string字符串的字符为大写,类似 String#toUpperCase.

添加版本

4.0.0

参数

  1. [string=''] (string): 要转换的字符串。

返回

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

例子

_.toUpper('--foo-bar--');
// => '--FOO-BAR--'
 
_.toUpper('fooBar');
// => 'FOOBAR'
 
_.toUpper('__foo_bar__');
// => '__FOO_BAR__'

数组 Array

集合 Collection

日期 Date

函数 Function

Lang

数学 Math

数字 Number

对象 Object

Seq

字符串 String

实用函数 Util

Properties

Methods