Count words in a sentence
<%
'the string to check
strText = "This is our sample text for this example"
'split the strText
arrText = Split(strText ," ")
'store the amount of words into intWords
intWords = Ubound(arrText )
'display how many words are in the sentence
Response.Write "There are " & intWords & " words in " & strText
%>
Monday, March 16, 2009
Count words in a sentence
Posted by Ali Abdelrazik at 12:03 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment