how to calculate no. of repeating characters in a a
string..please give me the code
Answer Posted / arunkumar vikram r k
Hi Amol, a small change in your script and the repeated characters can be printed or counted
Option Explicit
Dim getChar,strLen,ascChar(),CharCount,i,RepChar,getRes
getChar="VBSsccrript"
strLen=Len(getChar)
ReDim ascChar(strLen)
For i=1 to strLen
ascChar(i)=Mid(getChar,i,1)
Next
For i=1 to strLen
getRes=Split(getChar,ascChar(i),-1,1)
If ubound(getRes)=2 Then
RepChar=RepChar&" "&ascChar(i)
End If
Next
msgbox RepChar
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to start recording using quicktest professional?
When do go for loop condition in test?
Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,
tell me abt a time when u had to go above &beyind the call of duty to get the job done
How do you configure QTP AND Test director?
What is method name to compare two XML files.
What are test settings and global settings?
Describe how Smart Identification is used
What the differences are and best practical application of Object Repository?
how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??
Both static and dynamic arrays are handled by the vb script. Is it true?
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
• What type of testing questions will be asked for 2+ yrs exp people in interview?
The hybrid framework can be implemented for any application. Is it true?
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.