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

An optimised code with one loop:

strsting = "HelLo"
strnew = ""
For i = 1 To Len(strsting)
If InStr(1, strnew, Mid(strsting, i, 1), vbTextCompare) = 0 Then
strnew = Mid(strsting, i, 1) & strnew
strarr = Split(strsting, Mid(strsting, i, 1), -1, vbTextCompare)
If UBound(strarr) > 1 Then
MsgBox Mid(strsting, i, 1) & " is repeated " & _
UBound(strarr) & "times"
End If
End If
Next

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain data driven framework?

989


If the objects hierarchy is changing from build to build, then how you will handle that condition?

993


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

1788


What is accessibility check point?

1030


what is the difference btn risks & Therads in the Test plan documentation?

2066


Define object spy ?

967


How to add synchronisation points in qtp?

987


how can we compare descriptive programing with a regular expression

2334


What is Unicode Compatibility?

1918


Explain different type of event trigger option.

912


How do you test the text displayed in the header portion of times of india epaper. Hot news(banner) are scrolling in the top of the page, how do you test using QTP?

1960


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

1262


can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks

2043


Explain about the quicktest professional (qtp) automation object model?

941


Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?

1030