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
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?
Suppose I want fail that check point? How can you do that?
What is the extension of the recovery scenario file in qtp?
Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..
What is Unicode Compatibility?
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji
Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?
What are the types of object repositories? Which one is you are using?
How does you test a weblink which is changing dynamically?
What is the difference between the design-time and run-time data tables?
Dis advantages of XML checkpoint ?
How can I use Call dlls in QTP ?
What are the various types of Actions in UFT?
If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?