how to calculate no. of repeating characters in a a
string..please give me the code
Answers were Sorted based on User's Feedback
Answer / sandeeo
A="God is Great"
Cnt=split(A,"G")
msgbox Ubound(Cnt+1)
| Is This Answer Correct ? | 0 Yes | 1 No |
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 |
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 |
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 |
What are the file extensions for per-action, shared object repository files and what is the extension for library files?
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
How can get count of list box?
How do you invoke any application and write a script to invoke QTP using VB Script.
can i compare two databases using QTP ?
How to make "TEST Batches" in manual testing . How it is possible plz explin in detail?
How to verify the Cursor focus of a certain field?
Explain about invoking of application?
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.?
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.
what is smart identification in qtp? pls any give details? thanks in advance
how to check URL using QTP? write vb script with descriptive programm only?