How to findout the number of spaces with in STRING For Ex :
STRING is " RAJ IS A SOFTWARE ENGINEER "
Please send me the answer
Answers were Sorted based on User's Feedback
Answer / pavaniprasad
Dim str
str="RAJ IS A SOFTWARE ENGINEER"
s=split(str," ")
msgbox ubound(s)
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / shweta
str=" RAJ IS A SOFTWARE ENGINEER "
counter=0
For i=1 to len(str)
space_num=mid(str,i,1)
if space_num=" " Then
counter=counter+1
End If
Next
msgbox counter
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / sadriddin
str=" RAJ IS A SOFTWARE ENGINEER "
NumOfSp = Len(str) - Len(replace(str, " ", ""))
Msgbox NumOfSp
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the types of object repository?
What are the main attributes of test automation?
How to handle dynamic objects in quicktest professional (qtp)?
What is object spy in quicktest professional?
Write a script to delete a specific row in a webtable.
How to capture a window in QTP?
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
what is the diff between Procedure and function
What is text check point and text area check point?
write a qtp script to enter user name & password for flight reservation login page from excel sheet
If an application name is changes frequently i.e while recording it has name "Window1" and then while running its "Windows2" in this case how does QTP handles?
Suppose there are 10 browsers opened on desktop. I want to close all browsers except one browser in QTP. Can any one give the code for this?