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!