how to calculate no. of repeating characters in a a
string..please give me the code

Answer Posted / vinod

str = "abdabcefghefg"
J=0
K=1
z=""

For i=1 to len(str)
x= mid(str,i,1)
If InStr (1, z,x,1) Then
Else
z=z&x
'msgbox z
End If
Next

For i=1 to len(z)
x= mid(z,i,1)
y = split (str,x)
If Ubound (y)>1 Then
varCount=varCount+1
End If
Next
msgbox varCount

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is different command used in command Prompt while using QTP?

1747


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

1849


Hi All, I need code for how to execute qtp scripts from excell sheet

1463


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

1404


How to modify the text checkpoint?

614






Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance

1773


Connect to QC using AOM.

1234


Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks

1412


iam working in QTP for 2+ of exp if i attend the interview what r questions asked in perfomence testing{loadrunner} ? pls any one can say answer to this question?

1604


What is difference between design time and run time data table?

587


How to use the object spy in quicktest professional 8.0 version?

544


Are Shared ORs read-only?

628


Where can I find and view run-time data table?

524


If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?

1435


what is impact analysis on regression testing?

2046