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

Answer Posted / devi

The above script is correct. Apart from that script i have
one more script for finding no. of repeated characters in a
string

Suppose we have to know how many "s" are there in mississipi

code follows:

mystring = "mississipi"
charcount=len(mystring)-len(replace("s",""))
msgbox charcount

then output is : 4

Is This Answer Correct ?    6 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?

4951


How would you export a script from one pc to another in qtp?

884


What are parameterizing tests?

772


How to use the object spy in quicktest professional 8.0 version?

759


how do you parameterize search button from the website? the page is a single winobject and i have made a virtual object button of search button but search box can't be converted into a winedit and if we try to convert it into winedit the value we enter in a searchbox appears as numbers in the script so we arent able to parameterize.help!!!

1957


what is the latest version of QTP? Main difference between 9.2 and 10 version

1775


breef description of batch testing ?

1884


before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...

7659


How to remove the associated function library?

749


What are the different recording modes and how do they work?

830


When to use shared and local object repository?

825


What environment does qtp run in?

792


Explain more about the Test Fusion Report of QTP?

803


Explain the Different types of QTP test assets and their extensions?

844


How to connect the remote desktop using QTP 9.2 explain the method or procedure?

3037