Methods
(static) split(string, stringOrRegex) → {array}
- Source:
- Since:
- 0.1.0
- See:
Return an array splitting the input string with the provided separator or regex
Example
> split('a-b-c', '-')
['a', 'b', 'c']
Parameters:
Name | Type | Description |
---|---|---|
string |
string | The input string |
stringOrRegex |
stringOrRegex | Separator or regex |
Returns:
- Type
- array