How to findout the number of spaces with in STRING For Ex :
STRING is " RAJ IS A SOFTWARE ENGINEER "

Please send me the answer

Answers were Sorted based on User's Feedback



How to findout the number of spaces with in STRING For Ex : STRING is " RAJ IS A SOFTWARE ..

Answer / pavaniprasad

Dim str
str="RAJ IS A SOFTWARE ENGINEER"
s=split(str," ")
msgbox ubound(s)

Is This Answer Correct ?    13 Yes 0 No

How to findout the number of spaces with in STRING For Ex : STRING is " RAJ IS A SOFTWARE ..

Answer / shweta

str=" RAJ IS A SOFTWARE ENGINEER "

counter=0

For i=1 to len(str)
space_num=mid(str,i,1)
if space_num=" " Then
counter=counter+1
End If
Next
msgbox counter

Is This Answer Correct ?    9 Yes 0 No

How to findout the number of spaces with in STRING For Ex : STRING is " RAJ IS A SOFTWARE ..

Answer / sadriddin

str=" RAJ IS A SOFTWARE ENGINEER "

NumOfSp = Len(str) - Len(replace(str, " ", ""))

Msgbox NumOfSp

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Describe synchronization point.

0 Answers  


4. How u will open the build automatically in QTP except using Systemutil.run command

4 Answers  


How do we connect QC by using QTP?

2 Answers   Infosys,


how to open Excel sheet & write in it & save it?

1 Answers   InTech,


What is descriptive programming?

15 Answers   Wipro,


what are the limitations of automation testing?

2 Answers   TCS,


write a qtp code to display all the items in the fly from combo box or list box

3 Answers  


what is difference normal,analog,low level recording in qtp? what is lowlevel recording?

2 Answers   JPMorgan Chase,


what is impact analysis on regression testing?

0 Answers   L&T,


i want to handle all the unwanted pop up through QTP i done that with recovery scenario but it need some title of pop up but i want that it should handle all the pop up even i don't give the title of that pop up in recovery scenario is there any general way to handle all the pop up please help

3 Answers  


I am new to automation testing.I am learning QTP 9.2.my question is how to install the defferent addins(other than Default Addins) is there any defference in QTP after installing the Addins.where we can get the addins?

0 Answers  


Hi all please solve this.It is urgent..... When I right clicked on a Web image manually It displayed Open link,open link in new window,save picture as, Email picture,Printpicture,propeties...etc. While automation I have written a code like this 'browser("Google").Page("ramseeker®: Memory and_3").Image ("graphOfModel").Click 10,10,micRightBtn But the right click menu was not displayed. I want to save that image in a seperate folder

6 Answers  


Categories