$$split
Splits a string using a given delimiter/regex
Usage​
{
"$$split": /* String to split */,
"delimiter": "" /* string */,
"limit": 0 /* integer */
}
"$$split([delimiter],[limit]):{input}"
note
Concrete values in the usage example are default values.
Returns​
string[]
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | string | Yes | String to split | |
delimiter | string | "" | Delimiter to split by (can be a regular expression) | |
limit | integer | 0 | Limit the amount of elements returned (and by that, the amount the pattern get matched). - 0 - Means no limit. |
Examples​
Input
Definition
Output
"hello world"
"$$split:$"
[
"h",
"e",
"l",
"l",
"o",
" ",
"w",
"o",
"r",
"l",
"d"
]
"hello world"
"$$split(' '):$"
[
"hello",
"world"
]
"hello world"
"$$split(ll):$"
[
"he",
"o world"
]
"hello world"
"$$split(ll?):$"
[
"he",
"o wor",
"d"
]
"hello world"
"$$split(o,2):$"
[
"hell",
" world"
]