how to calculate no. of repeating characters in a a
string..please give me the code
Answer Posted / kajal
Function RepeatCharCountInString
RepStr = "Automation Using Test Complete"
Msgbox(RepStr)
RepStr = Replace(RepStr," ","")
RepStr = LCase(RepStr)
RepStr1 = RepStr
For i=1 to Len(RepStr)
RepStrChar = mid(RepStr1,i,1)
Count=0
For j=1 to Len(RepStr1)
Char = mid(RepStr1,j,1)
If(Char=RepStrChar) Then
Count = Count +1
End If
Next
If (Count = 0) Then
Exit For
End If
Msgbox(RepStrChar &" Count is " & Count)
RepStr1 = Replace(RepStr1,RepStrChar,"")
RepStr1 = RepStrChar+ RepStr1
Next
End Function
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is QTP’s model for test creation?
i have asked earlier only one question how to test web application using QTp plz send me the answer quickly
What are main panes available in qtp test browser?
How to indentify MS-Word objects like Menubar, Toolbar, table/columns/rows/cells etc within Word document, using QTP?
i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.
Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....
How many ways we can parameterize data in quicktest professional?
what QTP Options do you know?
Dis advantages of XML checkpoint ?
hi can any body give me a script for creating a modularity or keyword driven framework..i am working as a qtp tester for 2 months but still i am not exposed to framework in my company
Why is action split used by qtp?
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
What is the pros and cons between QTP and Rational Robot
Define Canvas view of UFT?
What test cases can you automate using QTP?