4.17.11
3.10.1
2.4.2
1.3.1
_.split([string=''], separator, [limit])
Splits string
by separator
.
Note: This method is based on
String#split
.
Since
4.0.0
Arguments
argument
[string='']
separator
[limit]
type
string
(RegExp|string)
number
description
The string to split.
The separator pattern to split by.
The length to truncate results to.
Returns
(array)
Example
_.split("a-b-c", "-", 2);
// => ['a', 'b']
_.split("a-b-c", "-", 2);
// => ['a', 'b']