Reference split()

split()

Splits a String into pieces and returns an array containing the pieces.

The first parameter, value, is the string to split.

The second parameter, delim, is the character(s) that should be used to split the string. For example, calling split('rock...paper...scissors', '...') would return the array ['rock', 'paper', 'scissors'] because there are three periods ... between each word.

Examples

Syntax

split(value, delim)

Parameters

value
String:

the String to be split

delim
String:

the String used to separate the data

Returns

String[]: Array of Strings
This page is generated from the comments in src/utilities/string_functions.js . Please feel free to edit it and submit a pull request!

Related References