Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











METHOD:  String::split


object.split [delimiter]

This method is used to 'split' a string into an array of substrings. The array numbering starts at zero.
 
The optional delimiter argument is the character, regular expression, or substring that is used to determine where to split the string. The delimiter value is not returned as part of the array of substrings.
 
If the argument is a character or substring, it must be enclosed with in a pair of double quotes. If the argument is a regular expression, do not enclose it with double quotes. If no delimiter argument is provided, the string is not split. If the empty string, "", is used as the delimiter, the string is split between each character in the string.
 
Code:
myString = new String("A,B,C,D")
splitString = myString.split(",")
document.write("<BR>" + splitString[0])
document.write("<BR>" + splitString[1])
document.write("<BR>" + splitString[2])
document.write("<BR>" + splitString[3])

 
Output:
A
B
C
D

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information