Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / sandeeo

A="God is Great"
Cnt=split(A,"G")
msgbox Ubound(Cnt+1)

Is This Answer Correct ?    0 Yes 1 No

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

Answer / venky

mystring = "mississipi"
slen=Len(mystring)
msgbox slen
ws=Len(replace(Mystring,"s",""))
msgbox ws
charcount=Len(mystring)-Len(replace(Mystring,"s",""))
msgbox charcount

Is This Answer Correct ?    1 Yes 3 No

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

Answer / 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

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

Answer / devi

in above some mistake is there

sorry for that

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

this is the correct one

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More QTP Interview Questions

How to create an Action Template?

1 Answers  


can u please explain what r the challenges u faced in ur automation testing

2 Answers   Genpact,


How can I generate customized logs in QTP ?

2 Answers   Ordain Solutions,


Does quicktest professional is unicode compatible?

0 Answers  


How many types of recording modes in qtp? Which will be used when?

0 Answers  


What is optional step in qtp? How you can add optional step in qtp?

0 Answers  


How many number of actions possible in qtp?

0 Answers  


what is aregular expression?

4 Answers   UHG,


After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.

4 Answers   V2 Solutions,


Hi Currently am using Qtp 10.0 Lisenced product.. but when am adding objects to object repository from google page it was identifying as windows objects.. please help me!!!

3 Answers  


what is the long form of QTP ?

2 Answers  


how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

3 Answers  


Categories