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
Answers were Sorted based on User's Feedback
Answer / uma
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
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / annie
a=inputbox("enter the string")
countspaces=len(a)-len(replace(a," ",""))
msgbox "count is" & countspaces
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nitin sharma
dim mystring
mystring = "QTP world is a software engineer"
msgbox Len(mystring)-Len(Replace(mystring," ",""))
'it will give count of spaces
Is This Answer Correct ? | 1 Yes | 0 No |
What is error handled other than recovery scenario manager?
suppose i opened 6browsers and i want re-open the 4browser what is code for this..pls help me..
is it possible to check the text displayed in the tool tip using QTP? if so, how?
Explain the views in the QTP GUI?
How to handle dynamic objects in quicktest professional?
What is VSS? Is it used in Automation(QTP) Or Manual? what is menus in VSS?
Once we get the Test Result from QTP.,I Have to convert into Excel file format..Is it possible..Can any gudie me regarding this... For Example : Total Test Case is : XXXXX Test Case passed : XXX Test Case Failed : XXX -------- Total XXXXXX ---------
can objects recogonised without repository?
In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?
What is object spy in quicktest professional (qtp)?
what is meant by Utility object and utility functions?can u all pls explain these clearly.
Explain the benefits of quick test pro(qtp)?