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
Whar are the challenges do we face while testing web based applications using the automation tool QTP or any??
Generic function to search for the unique link in webtable and click on it
Diff b/w test scenario's and test Procedures?
How can you write the scripts that operate on different objects depending on run-time information?
could any help me please, how to work on visual foxpro application using UFT
What are main panes available in qtp test browser?
Problem with XML checkpoint in QTP ?
Have you used xml check point in your project?
How will you compare keyword and expert view?
After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans
how to disable the pop ups through QTP using a script
What is the extension of qtp local repository?
How you create new action in qtp?
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined
what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?