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
Explain data driven framework?
If the objects hierarchy is changing from build to build, then how you will handle that condition?
How to add object to object repository in qtp9.0 Suppose for brower yahoo home page
What is accessibility check point?
what is the difference btn risks & Therads in the Test plan documentation?
Define object spy ?
How to add synchronisation points in qtp?
how can we compare descriptive programing with a regular expression
What is Unicode Compatibility?
Explain different type of event trigger option.
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?
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks
Explain about the quicktest professional (qtp) automation object model?
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?