> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/string/uppercase.md). Agents can also search and read this documentation through its [MCP server](https://lodash.shujuwajue.com/~gitbook/mcp).

# \_.upperCase（空格分隔的大写单词）

**语法：**

```javascript
_.upperCase([string=''])
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L15170)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.uppercase)

**描述：**

转换字符串`string`为 空格 分隔的大写单词。

**开始版本：**&#x34;.0.0

**参数：**

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

**返回值：**

* `(string)`: 返回大写单词。

**例子：**

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

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

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