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

Can we create user defined functions in qtp?

548


How can I import environment from a file on disk?

528


How do you configure QTP AND Test director?

1486


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

1416


What are the trigger events in qtp?

566






Whether qtp 9.0 supports Test director8.0

2112


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

1409


How will you test a keyboard?

591


What are the various automation frameworks available in qtp?

496


How is test case write?

568


If I give some thousand tests to execute in two days what do you do?

572


What is CMMP and CMMH?

686


How does qtp identify objects in the application?

575


Explain the qtp test phases.

607


what is meant by Implicit and explicit requirements?

3607