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 do u write script in qtp? where do u write?
what is purpose of automation?
Explain about Checking Bitmaps?
Hi, Where should I get all the test's results If I ran the scripts in Batch run. At the result window I found only last test result. Could any one help me on this?
please any one can explain the keyword driven framework. with gmail example.
Give me an example where you have used a COM interface in your QTP project?
How to add object to object repository in qtp9.0 Suppose for brower yahoo home page
waht is puirpose of accesbility Check point? waht is the use of Page and XML check points?
how qtp will recognise if application is run on many browsers
will QTP accepts javascript?
Hi, I want to write the script for a webpage. But i didn't added the properties of the objects to the object repository. Without adding the object properties to the object repository, how to write the script. When i am writing the script, Let us say i typed as Browser (""). after selecting ".", if the object is added to the object repository it will display atomatically. But in my case it is not as i didn't added the object properties. How to proceed further in the above mentioned case to write the script manually. Pls let me know if you didn't understand the question.
Qtp has been installed on my pc but recently ON opening it is giving this error PLEASE REPLY IT IS URGENT IT WAS WORKKING FINE QTPRO.EX THE instruction at "0x7.. ...". referenced memory at "0000....The memory could not be read... Awaiting QTP XPERTS REPly URGENT