Token's [Word Count] Simplified --
Posted: Fri May 09, 2008 3:10 am
I saw a few posts about this and played around with it till I got the result's needed. Enjoy
Code: Select all
NewList Token.s()
a.l = 0
b.s = " "
Repeat
a = a + 1
c.s = StringField("This is how many tokens are in this string.", a, b)
AddElement(Token())
Token() = c
Until c = ""
DeleteElement(Token(), LastElement(Token()))
ForEach Token()
Debug Token()
Next
Tokens = CountList(Token())
Debug Tokens