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 can i check items sorted or not in a weblist ? Give me the script for this...

0 Answers  


What is throw object?

1 Answers  


How to Practice QTP Scripts?

1 Answers  


When you open QTP, how many sheets you can see?

0 Answers   Wells Fargo,


Explain the check points in QTP?

22 Answers   Gray Matrix, IBM, Microsoft, Prapan Solutions, Zensar,


There are some links on the page,count and click those links and check the text on the page displayed on clicking the link.write script for this scenario.

0 Answers  


How u call functions in QTP Function to calculate the length of characters in a word -

5 Answers  


What is Tree view?

2 Answers  


Hi, How to give drop down values as input [Variable] from data table in QTP? If u know share with me.

3 Answers  


Step 3&4 are repeated until an the object in recognised uniquely.

0 Answers  


what is synchronization point, synchronization method, wait property method? with examples.. plz explain this in brief

3 Answers  


what about f2&f6 function keys

1 Answers  


Categories