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

give me the code to save all messages of inbox of gmail into a folder and notepad

1609


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?

1425


Suggest and Define a solution for an application whose objects are not recognized by UFT?

660


explain structured testing? plz guys with exp. do answer

1401


.have you ever written compiled module? if yes , tell me about some of the function that you wrote.

1674






Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks

1888


What is active screen?

556


What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.

1621


The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)

2794


What are the steps involved in recovery scenario wizard?

516


why should we give deliver good quality software?

1619


Explain quicktest professional testing process?

554


What is synchronization point in QTP?

666


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

1304


how to test use the quality control .how to verify the image verification

2533