simonchristieis
Programmer
I would like to count the characters in a string
eg
str = "123456"
str.match("1")
tells me there is a match - but I want to know how many times, as this is in a document.write statement, and because of the work that the page will have to do, I also don't want to use a function.
something like this:
a new Array()
document.write(a(str.match("1")).length)
any ideas anyone?
simon
eg
str = "123456"
str.match("1")
tells me there is a match - but I want to know how many times, as this is in a document.write statement, and because of the work that the page will have to do, I also don't want to use a function.
something like this:
a new Array()
document.write(a(str.match("1")).length)
any ideas anyone?
simon