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 |
Hello Everybody, How to maintain the page state in QTP. My scenario is: 1. I opened a notepad file. 2. Entered some text in the notepad file. 3.And changed the font type and color of the notepad file. And saved that. 4.Now next time when I will open the notepad it is showing the changed font type and color, rather than the default values. Please provide the code. Thanks, Gaytri
IF we use batch testing.the result shown for last action only.in that how can i get result for every action.
Other than using import sheet statement for importing the data from excel sheet, is there any other method that can be used?
when qtp recognizes a web link like (hyper link)wich properties it is going to take to identify the objects unquely? what is Ini file in QTP?
What are the views available in quicktest professional (qtp)?
What is Expert view?
How many types of parameters are there in QTP and what are they?
How to run scripts 1,29,3,5,7,2 scripts using test batch runner in QTP.... Ie...I wanted to run scripts not in an order 1,2,3,4,5...like that How it is possible using test batch runner... I dont want hardcoded script
How do you invoke an application using the step generator in qtp?
which type of testing process are you following in ur company? how to recognize a qtp page?
Can we do qtp testing without creating objects in Dbject repository? can we do it completely writing code i.e in expert view only. Are there any books for this?
What is output value?