Description

Split string by separator

Syntax

split(text, seperator, limit)

Parameters

Input ParameterTypeDescription
textstringThe string to split.
seperatorstringThe separator pattern to split by.
limit (optional)numberThe length to truncate results to.

Return value

Type
Array

Sample

ExampleResultDescription
split('John,Paul,Jr', ',')['John', 'Paul' , 'Jr']split by ','
split('John--Paul--Jr', '--')['John', 'Paul' , 'Jr']split by '--'
split('John,Paul,Jr', ',', 2)['John', 'Paul']split for 2 results

To view all the String functions, click here.