Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

after click on compose mail how can we attached a file in qtp with vbscript code

2190


When you open QTP, how many sheets you can see?

1089


Can any one tell me.......How the test engg's start testing in the compy environment.....real time tester PLSSSS help me i need in depth information regarding this...

1986


Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

1881


Explain how you can find the absolute value of the number in qtp?

1102


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1843


When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.

2137


what is review

2159


Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?

2390


what is error and fault in terms of software quality?

1992


What is the difference between the keyword view and expert view?

978


What is throw object?

2388


What is the difference between keyword view and expert view?

1068


WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT

2153


in my application,validation message has in japanise language.how to validate this message is appears properly or not

2066