how to count spaces in a given string ex: "this is jagadeesh"
in QTP with simple functional script

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me one scenario, the complex functionality you have automated in your project?

1571


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

1024


How to Test the mainframe application?

1911


What is checkpoints for qtp?

629


I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.

1693






How to find a window is minimized or not

1527


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

3010


How you will rate urself in QTP in the range of 0 to 5

1833


Explain qtp(quick test professional)?

659


In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail

1603


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1486


How many types of recording modes in qtp?

685


How to analyzing test results using quicktest professional?

730


Hi Friends, Would be great if you can provide the Model Question paper, Web site link or any reference s. Thanks & Regards, Byzoor,

1437


How will you report the bug and explain the defect tracking sheet you handled?

2647