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 |
Please explain the role of Regular expression in QTP
To retrive the test data which tool vl use and whats basis u vl write test data? its urgent
How to test background color and dynamic images during run time can you put the check point for moving objects?
What is throw object?
How does Parameterization and Data-Driving relate to each other in QTP?
Other than using import sheet statement for importing the data from excel sheet, is there any other method that can be used?
Which property will you use to check the object state? (Exist)
How to retrive XML file data in QTP ? using Script(Chandana)
what could go wrong with test automation?
How to add synchronisation points in qtp?
How to call a test from another test?
How to handle Run-time errors?