Split String
Function splitting a string on a separator
Evaluation
This expression evaluates to a function of the form:
(string x) -> list
The function splits a string using a separator. The split parts of the string are returned as a list of strings.
Settings
| Name |
Type |
Description |
Separator |
string |
The separator to use |
Split by Regex |
boolean |
If true, separator is interpreted as a regular expression. |
Limit |
long |
The limit setting controls how many parts to produce, and how to handle trailing empty strings:
-
If limit == 0 then the separator will be applied as many times as possible, the resulting parts list can have any length, and trailing empty strings are discarded.
-
If limit > 0 then the separator is applied at most limit times.
The resulting parts list’s length is no greater than the given limit, and the list’s last entry will contain
all characters beyond the last matched separator.
-
If limit < 0 or if limit is nil then the separator will be applied as many times as possible and the resulting parts list can have any length. Traling empty strings are preserved.
|