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
How do we handle run-time errors?
Explain about datafile/verification of date file when file is not available in local system?
What is Port testing. Whhen will you perform?
Differences between text and test area checkpoints?
How to Test the mainframe application?
Explain qtp(quick test professional)?
What is ObjectParamater?
I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?
Which environments are supported by hp qtp?
Can anyone pls tell me how to do action parameterization (input and output parameters) with respect to login window and insert order of flight reservation window in detail( pls give a clear step by step explanation with example) anyone please. Will be very thankful to u
write the vb script for call to new action in qtp?
What is an object repository?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?
Hi, my requirement is to make a query in SQL using QTP. And i have to get the results of that query and i have to use those results for future testing. I created a driver but i dont know the code for using this Driver. please help me by providing the solution for y requorement
What is the default add-ins in qtp?