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

What are the file extensions for per-action, shared object repository files and what is the extension for library files?

4 Answers  


When I used random numbers(1 to 9) with regular expression and run the test, it runs only 5 iterations with passed result instead of running all 1 to 9. Please tell me what can be the reason

0 Answers  


How can get count of list box?

0 Answers  


How do you invoke any application and write a script to invoke QTP using VB Script.

2 Answers   HealthAsyst,


can i compare two databases using QTP ?

0 Answers  


How to make "TEST Batches" in manual testing . How it is possible plz explin in detail?

1 Answers  


How to verify the Cursor focus of a certain field?

1 Answers  


Explain about invoking of application?

2 Answers  


I heard that in Hyderabad Ameerpet is renowned for its training institutes it has , but from my own experience I can only say that this institutes have become money making machines losing their cognitive ability and ethics , can anybody tell me is there a good ins. in hyderabad for testing tools.?

2 Answers  


I have to do testing for XML file using QTP. 1. I was given a sample XML, I had to edit that with my actual data and had to make a new XML-- this part is completed, I did that. 2. Now I have to copy the exact contents of that XML file and have to paste it in a web application as a request message for web appliaction processing, using QTP. So I am unable to copy and paste it in web application, please help me out.

1 Answers  


what is smart identification in qtp? pls any give details? thanks in advance

3 Answers   IBM,


how to check URL using QTP? write vb script with descriptive programm only?

1 Answers   Syntel,


Categories