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
WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,
What is checkpoints for quicktest professional?
Which scripting language used by quicktest professional?
What is keyword driven framework?
if numbers are always changing write a script for that
how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance
What are private functions in QTP? How they can be called from the function library?
Hello friends..... On which areas of an application we can not test with QTP
what is stepin & stepout?
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.
Explain the difference between check point and output value?
If a button named "CLICK" is recorded in low level recording mode , what will be the values stored for "name" property of that button in object repository ?
HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?
What are the different types of checkpoints?