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

Answer Posted / sudhanshu

Dim Str, ChkDup,i,Cnt
Str = Inputbox("Enter the String Name")
For i = 1 to Len(Str) step 1
ChkDup=mid(Str,i,1)
Cnt = split(Str,ChkDup,-1) 
msgbox Ubound(Cnt)
Next

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of text output value in quicktest professional (qtp)?

600


How to use conditional loops in qtp ?

589


how to download mercury qtp9.2 ny internet ?

2964


I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing

1485


how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.

1318






What are the key points to create a framework in QTP for oracle forms?

1809


what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”

1489


HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?

1716


In qtp, how you can exit for loop?

527


What is the process of synchronizing qtp and aut?

568


i can done the project with QTP in that time i can say how many members in my team size?

1368


how can we compare descriptive programing with a regular expression

1925


How to test results for qtp ?

785


Is it possible to call win runner script in qtp?

625


What are the differences between quicktest professional and winrunner?

538