@tempots/std
splitStringOnce() function
It only splits on the first occurrance of separator.
Signature:
splitStringOnce: (s: string, separator: string) => [string] | [string, string]
Parameters
Parameter |
Type |
Description |
---|---|---|
s |
string |
The string to split. |
separator |
string |
The separator to split the string on. |
Returns: [string] | [string, string]
An array with the split string.