_.split
Lodash only
Splits string by separator.
- // Lodash
- var result = _.split('a-b-c', '-', 2)
- console.log(result)
- // output: ['a','b']
- // Native
- var result = 'a-b-c'.split('-', 2)
- console.log(result)
- // output: ['a','b']
Browser Support for String.prototype.split()
✔ | ✔ | 1.0 ✔ | ✔ | ✔ | ✔ |
当前内容版权归 you-dont-need 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 you-dont-need .