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

Answer Posted / amol ghule

' A shorter version of code

Option Explicit
Dim getChar,strLen,ascChar(),CharCount,i,UniqChar,getRes
getChar="TestmyKnowledge1221"
strLen=Len(getChar)
ReDim ascChar(strLen)

For i=0 to strLen-1
ascChar(i)=Mid(getChar,i+1,1)
getRes=Split(getChar,ascChar(i),-1,1)
If ubound(getRes)=1 Then
UniqChar=UniqChar&" "&ascChar(i)
End If

Next
msgbox UniqChar

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

To which environments does quicktest professional supports?

536


what is clean sweep?

1514


What are some test assets and related extensions of qtp?

554


They asked by using qtp recording writing scripting

2069


Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........

1445






write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading

1489


Explain the use of action split in qtp?

566


What is a quick test professional?

627


In qtp, how you can get the last character from a string?

556


How does quicktest professional (qtp) identifies the object in the application?

581


Without using gui map editor we can recognize the application in winrunner ?

604


what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent

1338


What are the ways you can synchronize?

581


What is checkpoint in qtp?

550


How does QTP identify an object?

611