how to count spaces in a given string ex: "this is jagadeesh"
in QTP with simple functional script
Answers were Sorted based on User's Feedback
Answer / jaag@jagadeesh
dim str
str="this is jagadeesh
var=UBound(split(str," ")))
msgbox var
ans
2
Is This Answer Correct ? | 19 Yes | 2 No |
Answer / karthik janahan
Dim str
str = "how to count spaces in a given string"
msgbox (len(replace(str," ","..")) - len(str))
Is This Answer Correct ? | 9 Yes | 2 No |
Answer / ekapop (scnyl)
Hi,
Const sMY_INFO = "this is jagadeesh"
Function GetTotalSpaceFromText(ByVal sText)
Dim iTotal
Dim asInfo
asInfo = Split(sText, " ")
iTotal = UBound(asInfo)
Erase asInfo
GetTotalSpaceFromText = iTotal
End Function
Msgbox "My Text = " & sMY_INFO & vbCrLf & _
"Total Space = " & GetTotalSpaceFromText(sMY_INFO)
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / nitin kumar
str="this is jagadish"
k=split(str," ")
msgbox("spaces are "&ubound(k))
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nahush
txt = "this is jagadeesh"
no_of_space = len(txt)-len(replace(txt," ",""))
MsgBox no_of_space
Is This Answer Correct ? | 0 Yes | 0 No |
How you know that a test case is a regression test case
How to create Userdefined Function.Please write the steps ans also provide example where exatcly we use it.
I am in need of some set of QTP FAQ @ interview. Also recently in one of interview portal they asked me how you write the script for Login application which it is web -based and using Descriptive Programming? Without associating the shared object repository?Please i do need this answer very soon? Please respond me soon @ vaisu72@yahoo.com
How to Creating an Output Value using QTP?
WHAT IS THE DESCRIPTIVE programming when it is useful? & when to use this ?
HOW MANY WAYS ARE THERE TO CPY TEST IN TEST LAB
suppose i give valid user id and password to open an web base application on qtp.how qtp will know itis a valid user id and password
hi everybody this questions is only for qtp real time users. anyone please clearly explain the approach u r following for qtp testing in ur company or qtp framework u r following in ur company pelase give me clear explanation then u did great favour to inexeprienced qtp users
why should we give deliver good quality software?
i have data in excel sheet.i imported the data in data table.while doing parameterization,how the code knows it is a valid or invalid data?
Through array we can execute the testcase how ? give me example
What is test automation framework?which framework does QTP follow?Need some practical explanation as to how u will start ur testing process following a particular framework?