ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories >> Software >> Testing >> Automation-Testing >> QTP
 
 
 
Question
How can i count "spaces" in any sentence or a string
if suppose " It is a Testing question"
Here we have 4 gaps(spaces)
Is there any function to find out spaces between words
 Question Submitted By :: Rayudu
I also faced this Question!!     Rank Answer Posted By  
 
Answer
Test:

str="it is a testing question"
Call spacecount(str,d)  /*Function Call*/
msgbox "Number of spaces:" & d

User Defined Function : 

Public function spacecount(a,b)
 str=a
 p=split(str)
 coun=0
For i=1 to ubound(p)
 coun=coun+1
Next
 msgbox coun
 b=coun /*Returns Number of spaces to the calling Function /
End Function

 
4
Uma
 
View All Answers
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com