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

Answer Posted / vijay kumar chourasiya

Dim Str, ChkDup,i,Cnt
Str="aaabc"
For i = 1 to Len(Str) step 1
ChkDup=mid(Str,i,1)
Cnt = split(Str,ChkDup,-1)
result= Ubound(Cnt)
result1=result1&result
Next

MsgBox result1

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between run time object and test object in QTP?

560


Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table. I dont need the string Bed:4,I would like to get only the no 4. How can I get it? Even though I highlight only 4,It is seleting the full value "bed 4". Same thing happend for second webelement Bath:2 Full,1 partial I need only the No 2. I used the following to split MyArray = Split(UIBathResult, " ", -1, 1) But it is giving the value My Array(0)=Bath:2full,1Partial I need the only the nos for further comparision.Any help? Thanks Uma

3227


How the exception handling can be done using quicktest professional (qtp)?

562


What is the purpose of loading qtp add-ins?

617


Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?

1473






When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.

1597


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1717


Where to use function or action?

664


Where you are storing your script?

627


tell me exact differenceb bw qtp and selenium?(could not tell open soure and licennce? difference in usage and technical difference?

1516


Hi All, How to Compare two strings character by character in QTP

949


Explain the Different types of QTP test assets and their extensions?

599


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

1799


1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible

1598


Can you list some technologies that support qtp?

542