strings.split

Supported in:
strings.split(string, delimiter)

Description

Splits string value using the delimiter argument. The default delimiter is a comma (,).

Param data types

STRING, STRING

Return type

ARRAY_STRINGS

Code samples

The following code samples illustrate some of the ways you might use the strings.split function.

Example: split string with default

The following example splits the string using the default delimiter, which is a comma.

strings.split("a,b,c,d") = ["a", "b", "c", "d"]
Example: split string with colon

The following example splits the string at each colon (:).

strings.split("a:b:c:d", ":") = ["a", "b", "c", "d"]
Example: missing delimiter

The following example is missing the delimiter in the string value.

strings.split("a,b,c,d", ":") = ["a,b,c,d"]
Example: empty delimiter

The following example has an empty delimiter string.

strings.split("abc", "") = ["a", "b", "c"]