| This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy. Visit the NEW ZetaBoards Support forum! |
| Word Count Function | |
|---|---|
| Tweet Topic Started: Mar 31 2008, 01:21 PM (582 Views) | |
| Viral | Mar 31 2008, 01:21 PM Post #1 |
|
i'm stanley nao
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
When looking back at codes, when needing to work out how many words there were in a string, I would use something like:
I was just a bit bored and tried working on a better version, which is shown underneath here. Is there anything I would need to change? While typing this, I just thought of a much easier way, using RegExp, but I'll try that out later.
That's the function. Using RegExp, I wouldn't need the limited array, just use the non word pattern (if I can remember what that is). So if I were to use: [/i]
It would alert I. Any comments? Edited by Viral, Mar 31 2008, 01:21 PM.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Coding & Modifications · Next Topic » |




![]](http://z3.ifrm.com/static/1/pip_r.png)



2:08 PM Jul 11