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

Answer Posted / amol ghule

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

For i=0 to strLen-1
ascChar(i)=Mid(getChar,i+1,1)

Next
For i=0 to strLen-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

Get the count of files of similar types from a folder.

975


QTP script is not working on other's machine..

1537


There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?

1624


What is parameter in qtp?

676


Explain types of output values?

567






How you will rate urself in QTP in the range of 0 to 5

1746


please post the interview questions for QA position in FACTSET

3950


Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com

1413


What is qtp window?

566


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, if possible, kinldy mail PDF file to my mail-ID: ramakrishna908@gmail.com Regards, krishna.

1467


Approach for Installation,comaptibility,system testing

1706


what is error and fault in terms of software quality?

1457


What are the different types of qtp test assets and their extensions?

597


i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?

1501


what is output value in QTP and how it can be used in automation testing

1435