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 can i check items sorted or not in a weblist ? Give me the script for this...
What is throw object?
How to Practice QTP Scripts?
When you open QTP, how many sheets you can see?
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.
How u call functions in QTP Function to calculate the length of characters in a word -
What is Tree view?
Hi, How to give drop down values as input [Variable] from data table in QTP? If u know share with me.
Step 3&4 are repeated until an the object in recognised uniquely.
what is synchronization point, synchronization method, wait property method? with examples.. plz explain this in brief
what about f2&f6 function keys