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


Please Help Members By Posting Answers For Below Questions

Explain the concept of how quicktest professional (qtp) identifies object?

580


How to delete an object from the object repository?

595


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.

535


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

1464


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????

2157






How software automation specialist enter steps in the Expert View?

1678


How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?

3058


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

1415


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?

1747


what is the mail use of frame work(with detail). architecture for keyword driven frame work

1425


How to get Traceability matrix from TD?

680


What are the technics follow in writing VB script?

1536


What r the different filters in defect in quality center

3287


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)

1627


How to test login module with different username and password by using data driven testing in QTP?

614