Please let know the scripts for counting number of repeated
letters in the word. Note repeated letter should not be
count agian.
Ex: If "Hello" is my word... l is coming twice.. it should
count once and print... secong 'l' should not count again..
Answer Posted / chaitanya
Option Explicit
Dim st,cnt,str,i,j
str = "happy"
For i=1 to len(str)
cnt =0
st = mid(str,i,1)
For j=1 to len(str)
If mid(str,j,1)=st Then
cnt =cnt +1
End If
Next
If cnt>1Then
msgbox st & " repeats " & cnt & "times"
End If
Next
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain the concept of how quicktest professional (qtp) identifies object?
How to delete an object from the object repository?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain
I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????
How software automation specialist enter steps in the Expert View?
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?
hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com
For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?
what is the mail use of frame work(with detail). architecture for keyword driven frame work
How to get Traceability matrix from TD?
What are the technics follow in writing VB script?
What r the different filters in defect in quality center
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
How to test login module with different username and password by using data driven testing in QTP?