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 find if given number is prime or not
Explain the Different types of QTP test assets and their extensions?
Shall we add Local Repository to shared object repository,if yes,how we add
I am using DataTable.ImportSheet method to import the data from an excel sheet to the Runtime DataTable of QTP. here is my piece of code DataTable.import("c:\DataSheet.xls","Members","Members") The first row headings of Members sheet of DataSheet.xls and Members sheet of QTp are matched. but the QTP is taking very long time(approximately half an hour) to import the data into runtime datatable even though the DataSheet.xls has one or two rows in it. Please let me know why this is happening and is there any alternative for impoting the data into runtime datatable of qtp ?
how do u get lib files into scripting files?
What is InStr()
What will be the output of the statements below? On error Resume Next Sum 100/0 if Sum= 0 Then msgbox "Pass" else msgbox "Fail" End If
RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?
can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?
i want know iam working 2+ exp in QTP can i do performence testing (eg:loadrunner) yes r no?
what is the use of descriptive programming in QTP ? when we need to use DP? can we test the application completely with out useing DP?? please explan with example
How does u create new test sets in TD?