split tag
Transient logic tag
Splits a piece of text into a list of values.
Sample usage
<split {red green blue}> generates {red}, {green}, {blue}.
<split {a, b} delim={, }> generates {a}, {b}.
Fields
Primary field
Scalar field
The text to split.
Secondary fields
- delim: (scalar field, optional) the text that separates the values. If not given, the text is split wherever there is whitespace.
Behaviour
Generates the pieces of text found between the separators, in order.
- Without delim, runs of spaces, tabs and newlines count as a single separator.
- A delim can be more than one character long.
- Splitting empty text generates a single empty value.
Notes
split is the opposite of join.
See also