PDA

Click to See Complete Forum and Search --> : String manipulation


msdnexpert
Nov 8th, 2000, 02:18 AM
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.

Mark Sreeves
Nov 8th, 2000, 09:57 AM
indexOf() is what you want

eg:



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)

msdnexpert
Nov 11th, 2000, 12:46 PM
Thanks Mark http://www.irt.org solved more than 96.7% of my problems. Thanks again.