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 / mahesh.k
str=inputbox("enter a string")
ln=len(str)
nr=0
cnt=0
For i=1 to ln
If cnt>0 Then
nr=nr+1
End If
cnt=0
If strcomp(x,mid(str,i,1))<>0 Then
For j=i+1 to ln
If mid(str,i,1)=mid(str,j,1) then
cnt=cnt+1
x=mid(str,i,1)
end if
next
else
i=i+1
End If
Next
msgbox "no.of repeeted charecters="&nr
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the qtp testing process?
Explain object spy in qtp.
How is recording done when a application is over lapping the QTP application it gives a message object not recorded
To which environments does quicktest professional supports?
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
in my application,validation message has in japanise language.how to validate this message is appears properly or not
can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com
If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?
Hi All, How to get repeated word in string . Thanks Balaji
Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work
What are the different types of qtp test assets and their extensions?
whow much strong on VB and C?
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
What is a recovery scenario?
I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.