string join
FEEL built-in function · FEEL string functions
string join(list, delimiter?)
Concatenates a list of strings into one string, optionally separated by a delimiter. Null elements in the list are skipped.
This is the list counterpart of the + operator. Elements must be strings: a list of numbers gives null, so convert with for x in list return string(x) first.
Parameters
| Parameter | Type | Description |
|---|---|---|
| list | list of strings | the strings to concatenate; null elements are ignored |
| delimiter | string | separator between elements (optional) |
Examples
string join(["a", "b", "c"], ", ")
a, b, c
Try it ↑
string join(["a", null, "c"])
ac
Try it ↑
Edge cases and null handling
string join([], ", ")
(empty string)
Try it ↑
string join(for x in [1, 2] return string(x), ", ")
1, 2
Try it ↑
Part of FEEL string functions: the rules all of them share, string concatenation, regex pitfalls and every function side by side.
Related functions
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).