Splits string by separator.
string
separator
Note: This method is based on String#split.
String#split
Optional
The string to split.
The separator pattern to split by.
The length to truncate results to.
Returns the string segments.
5.0.0
split('a-b-c', '-', 2)// => ['a', 'b'] Copy
split('a-b-c', '-', 2)// => ['a', 'b']
Splits
string
byseparator
.Note: This method is based on
String#split
.