How can i count "spaces" in any sentence or a string
if suppose " It is a Testing question"
Here we have 4 gaps(spaces)
Is there any function to find out spaces between words
Answers were Sorted based on User's Feedback
Answer / uma
Test:
str="it is a testing question"
Call spacecount(str,d) /*Function Call*/
msgbox "Number of spaces:" & d
User Defined Function :
Public function spacecount(a,b)
str=a
p=split(str)
coun=0
For i=1 to ubound(p)
coun=coun+1
Next
msgbox coun
b=coun /*Returns Number of spaces to the calling Function /
End Function
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / annie
a=inputbox("enter the string")
countspaces=len(a)-len(replace(a," ",""))
msgbox "count is" & countspaces
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nitin sharma
dim mystring
mystring = "QTP world is a software engineer"
msgbox Len(mystring)-Len(Replace(mystring," ",""))
'it will give count of spaces
Is This Answer Correct ? | 1 Yes | 0 No |
What is the need and applications of learning VB script for a automation(QTP) engineer ain Realtime ?
How can you identify the browser and its information using the qtp script?
Can we Test Welcome Screens and Process Images with QTP
what is the use of automation frame work ??(QTP)
What are the key elements available in test result window?
How many types of OBJECTS are there in QTP?
8 Answers Intel, Inter Globe Technologies,
hi Sudhananda reddy, in my resume, i written as , I Am working as a Test Engineer for xyz company. IS IT RIGHT OR WRONG? WHAT IS THE ACTUAL meaning of "IN XYZ COMPANY", "FOR XYZ COMPANY", "WITH XYZ COMPANY".
Tel me what was the automation testing process you followed?
Can we do qtp testing without creating objects in Dbject repository? can we do it completely writing code i.e in expert view only. Are there any books for this?
does QTP provides any tools for parametrisation?
what is exact difference between smoke and sanity testing?
Using Regular expression method some particular value is not present in given value. HOow do use regular expression? Forexample password all number,character ,special character are accepted but (_',)underscore,comma are not used. How do write regular expression.