> 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/startcase.md).

# \_.startCase（空格间隔的首字母大写单词）

**语法：**

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

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

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

**描述：**

转换`string`字符串为[start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage)。

**开始版本：**&#x33;.1.0

**参数：**

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

**返回值：**

* `(string)`: 返回转换后的字符串。

**例子：**

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

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

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