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

How do we analyze the checkpoint results?

587


What are the types of object repositories? Which one is you using?

621


what is clean sweep?

1521


How can you pass value one action to another action?

555


What is TOM in QTP?

1806






if mandatory and Assitive propertys are shows same how will u write skript in QTP window

1628


Describe function procedure in vbscript.

553


What is the difference between analog and low level recording?

625


1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.

1679


What is the difference between the keyword view and expert view?

528


How are actions and functions different in QTP?

659


How to get the particular property value?

612


Explain the benefits of quick test pro(qtp)?

572


What is an object repository?

611


I want to know can we integrate visual source safe tool with QTP and QC for our version controlling process? WE know QTP and QC 10.0 version is having the version control inbuilt in it but I want to know the merits and demerits of the inbuilt version control tool and the visual source safe tool using QTP and QC.

2470