Switch to full style
ASP/ASP.net examples
Post a reply

get number of words in a string

Thu Mar 31, 2011 12:02 am

Following code get the number of code in a specific string .
Code:
<% 
'string value to be check
strTest= "This is our sample text for this example" 
'
splitting  the string strTest
strArrayTest
= Split(strTest ," ") 
'get number of words
intNumWords= Ubound(strArrayTest) 
'
display the counts 
Response
.Write "There are<b> " & intNumWords& "</b> words in " & strTest
%> 




Post a reply
  Related Posts  to : get number of words in a string
 Breaking the String into Words     -  
 Return words count in a string     -  
 get number from string     -  
 Number of Occurrences of characters in a string     -  
 sort words in c++     -  
 convert integer number to octal,hexadecimal number systems     -  
 probability of repeated words     -  
 Change the letter spacing of the words     -  
 convert octal number to decimal number     -  
 convert decimal number to octal number     -  

Topic Tags

ASP Strings