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
What is the use of an object spy tool in qtp?
what is error and fault in terms of software quality?
How QTP support all types of applications (platforms)?
what is clean sweep?
What is object spy in quicktest professional?
How can I check if a environment variable exist or not?
what is impact analysis on regression testing?
What is optional step in qtp? How you can add optional step in qtp?
Explain calling sub procedure.
banking project description for software tester
If the objects hierarchy is changing from build to build, then how you will handle that condition?
In what occasion we can specify global sheet and action sheet?
What are benefits of qtp?
Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points
How many types of trigger events are there in qtp?