split

Syntax

split(str, [delimiter])

Arguments

str is a STRING scalar.

delimiter (optional) is a CHAR or STRING scalar indicating the separator. It can consist of one or more characters, with the default being a comma (',').

Details

  • If delimiter is not specified, split str into a CHAR vector.

  • If delimiter is specified, use delimiter as the delimiter to split str into a CHAR vector or a STRING vector.

Examples

split("xyz 1");
// output
['x','y','z',' ','1']

split("xyz 1"," ");
// output
["xyz","1"]

split(`xyz1,`xyz);
// output
[,"1"]

split(`xyz1,`xyz)[1];
// output
1