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 |
How to create an Action Template?
can u please explain what r the challenges u faced in ur automation testing
How can I generate customized logs in QTP ?
Does quicktest professional is unicode compatible?
How many types of recording modes in qtp? Which will be used when?
What is optional step in qtp? How you can add optional step in qtp?
How many number of actions possible in qtp?
what is aregular expression?
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.
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!!!
what is the long form of QTP ?
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.