javascript String split( )
| split( ) | NN 3 IE 4 ECMA 1 |
split(delimiter [, limitInteger]) | |
|
Returns a new array object whose elements are segments of the current string. The current string is divided into array entries at each instance of the delimiter string specified as the first parameter of the method. The delimiter does not become part of the array. You do not have to declare the array prior to stuffing the results of the split( ) method. For example, if a string consists of a comma-delimited list of names, you can convert the list into an array as follows: var listArray = stringList.split(",");
|
|
You may also use a regular expression as the parameter to divide the string by a pattern rather than a fixed character. |
|
| Parameters | |
|
|
| Returned Value | |
Array. |
|
Previous: javascript String strike( )
1793,Nickname,Homepage or email,Comments here,Add comment
