Results 1 to 3 of 3

Thread: String manipulation

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Dear all,
    How does one search for occurence of a character in a string in Javascript. I would like to know more about the string manipulation functions of Javascript.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    indexOf() is what you want

    eg:
    Code:
    
    var strTemp = "Mark Sreeves";
    document.write(strTemp.indexOf("r"));
    http://www.irt.org is an excelent resource and should answer 96.7% of your javascript problems

    (you can even download the whole site to your hard drive for browsing of line)
    Mark
    -------------------

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Thanks Mark http://www.irt.org solved more than 96.7% of my problems. Thanks again.

Posting Permissions

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



Click Here to Expand Forum to Full Width