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 / pvr

Dim str,ln,i,md,ub,sp
str="apple"
ln=len(str)
for i=1 to ln
md=mid(str,i,1)
sp=split(str,md)
ub=ubound(sp)
if ub=i+1 then
msgbox md &vbnewline& "contain more than one character in
given string"
else
msgbox md &vbnewline& "contain only one character in given
string"
end if
next

If any modifications are there please let me know....

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the types of properties that quick test learns while recording?

564


How is a Step generator used in UFT?

663


Can we write winrunner language i.e TSL in QTP tool?

1479


How to record a qtp script ?

562


What is data driver in qtp? Where we use it?

572






Explain advantages and disadvantages kdf?

527


How to use parameterization in qtp?

626


What is checkpoints for quicktest professional?

551


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

1384


What are the things(properties, and other details) will be recorded while recording an object using normal recording?

1495


Can we run test with out adding object in object repository? How it is possible?

550


In qtp, how you can get the last character from a string?

556


what is command for executing files?

1517


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

869


How do you perform Regreession Testing?

1465