// -> script> body> html>
Split method
Segment a string into a sub-string and return the result as a string array.
Stringobj.Split ([separator [, limited]])
parameter
StringObj
required. To decompose String object or text. This object will not be modified by the Split method.
Separator
Optional. Strings or regular expression objects that identify one or multiple characters when you identify the string. If you ignore this option, return a single element array containing the entire string.
Limit
Optional. This value is used to limit the number of elements in the array.
Description
The result of the Split method is a string array that decomposes every sepant in StingObj. Separator is not returned as part of any array element.
Example
The following example demonstrates the usage of the Split method.
Function splitdemo () {
Var S, SS;
Var s = "The rain in spain falls mainly in the place.";
// Decompose at each space character.
SS = s.split ("");
Return (SS);
}