split
最后更新于:2022-04-02 00:07:29
## split
+ [link](./split "Link to this entry.")
+ [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L12498 "View in source.")
+ [npm](https://www.npmjs.com/package/lodash.split "See the npm package.")
```
_.split([string=''], [separator], [limit])
```
以 `separator` 拆分字符串
**注意:** 这个方法基于 [`String#split`](https://mdn.io/String/split)
### 参数
1. [string=''] (string)
要拆分的字符串
2. [separator] (RegExp|string)
拆分的分隔符
3. [limit] (number)
限制的数量
### 返回值 (Array)
返回拆分部分的字符串的数组
### 示例
```
_.split('a-b-c', '-', 2);
// => ['a', 'b']
```
';