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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the syntax to call one script from another?
i have a doubt can anyone tell me where are scripts stored while using QTP.Tell me the exact procedure takes place in real time?like how we call scripts how to proceed after writing scripts?how scripts are executed etc?i heard some use Qc whether others dont use.so tell me whole procedure for both the things it will be a very big help.as i have interview i want to have whole idea on this.its very urgent.
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp
In qtp, how you can remove the spaces from string?
if anyone has idea of the interview procedure in covansys, plz send me a mail?
Explain about the test fusion report of quicktest professional?
How are actions and functions different in QTP?
Where we use data driver in qtp?
Why to use descriptive programming?
What is an optional step in qtp ?
What are the Disadvantages of shared object repository?
Diff b/w Health care domain and Banking Domain?
By using QTP can we record any log files written by the application which is in execution?
what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?