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.

उदाहरण

सिंटैक्स

split(value, delim)

पैरामीटर्स

value
String:

the String to be split

delim
String:

the String used to separate the data

Returns

String[]: Array of Strings
Notice any errors or typos? Please let us know. Please feel free to edit src/utilities/string_functions.js and open a pull request!

संबंधित संदर्भ