SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    spliting strings

    Hello again I wanted to know how I can split a string based on space so basically every word! Something like this?

    var myString="This Is A String";
    myString.split():
    myString("This","Is","A","String");

    Any Help?

  2. #2
    SitePoint Enthusiast Radnor's Avatar
    Join Date
    Feb 2002
    Location
    Orlando, FL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This will place your string into an array of words:

    Code:
    var myString="This is a string.";
    var words=myString.split(" ");


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •