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
the String to be split
delim
the String used to separate the data
Notice any errors or typos? Please let us know. Please feel free to edit src/utilities/string_functions.js and open a pull request!