arrays.join_string

Supported in:
arrays.join_string(array_of_strings, optional_delimiter)

Description

Converts an array of strings into a single string separated by the optional parameter. If no delimiter is provided, the empty string is used.

Param data types

ARRAY_STRINGS, STRING

Return type

STRING

Code samples

Here are some examples of how to use the function:

Example 1

This example joins an array with non-null elements and a delimiter.

arrays.join_string(["foo", "bar"], ",") = "foo,bar"
Example 2

This example joins an array with a null element and a delimiter.

arrays.join_string(["foo", NULL, "bar"], ",") = "foo,bar"
Example 3

This example joins an array with non-null elements and no delimiter.

arrays.join_string(["foo", "bar"]) = "foobar"