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
Answer Posted / 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 |
Post New Answer View All Answers
What are the factors on which script execution time is dependent?
What is the limitation to XML Checkpoints?
How can you identify the browser and its information using QTP script?
What are the things(properties, and other details) will be recorded while recording an object using normal recording?
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
How would you export a script from one pc to another in qtp?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
What is the virtual object?
What are the key points to create a framework in QTP for oracle forms?
What is an expert view and keyword view?
What is qtpro? What is quick test pro?
What is qtpro? What is a quick test professional?
hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.
Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..
What is a data driven test in qtp?