Counting number of words in a string
This is a simple and easy way for counting the number of words in a string.
Original Author: Hendry Cahyadi
Code
The string is: " & TheString Number of words in that string: " & NumberOfWords Here are the words which compose that string: "dim TheString, ArrayTemp, NumberOfWords, Word
TheString = "Hello, How are you today?" 'just a test string
ArrayTemp = split(TheString, " ")
NumberOfWords = UBound(ArrayTemp) + 1
Response.Write "
Response.Write "
Response.Write "
for each Word in ArrayTemp
Response.Write "
" & word
next
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.