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

How to create runtime property for an object?

1440


Suggest and Define a solution for an application whose objects are not recognized by UFT?

660


A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.

1268


Hi All, How to Compare two strings character by character in QTP

948


what is error and fault in terms of software quality?

1499






How to export quicktest professional (qtp) results to an .xls file?

588


What are the flaws in water fall model and how to overcome it?

554


What are the things(properties, and other details) will be recorded while recording an object using normal recording?

1483


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1398


how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up

3741


How can you close the second opened browser?

792


How to use descriptive programming?

601


Hello friends..... On which areas of an application we can not test with QTP

1549


wht type of User defined functions or Java Releated functions do we write in VB scripting

1815


How to analyzing test results using quicktest professional?

560