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
What is the difference between local and shared object repository in qtp?
What are the views available in quicktest professional?
What are benefits of qtp?
What is the Command used to start the QTP
Why is Client side image is preferred over server side image?
What are the trigger events in qtp?
Explain advantages and disadvantages of ddf?
I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?
.have you ever written compiled module? if yes , tell me about some of the function that you wrote.
In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?
Explain different types of checkpoints?
On what document base Descriptive programming is written if build is not yet ready ?
what is the difference between the modular framework and datadriven frame work
What are the recording modes in wave event?
They asked by using qtp recording writing scripting