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 |
how to generate numbers in between to numbers suppose numbers in between 500 to 1000 in sequencies using vbscript
What is the difference between "call" and "callclose"
What is the difference between keyword driven frameworkd and Modularisation framework?(Chandana)
Any one please tell me how to create framework in QTP (in detail). Is there any website for reference?
I am executing a batchfile.In one script on one Button i have inserted a checkpoint.It is in a loop,my checkpoint is going to fail sometimes.That failed results only I have to log in a file.How it's possible...pls give the solution for this?
What is Port testing. Whhen will you perform?
what type of framework u r using in ur organization
str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any one knows send to answer
Hi Friends ,I want to Know name of the Site for the QTP Help and the Best Book through that I can start the QTP Practice here also whare can I download the QTP Users Guide I search I was Unable .
Add parameters during time in each row in one column
what is main difference between QTP 8.2 AND QTP 9.0/9.2 HOME PAGE?i mean what are extra thing in QTP 9.0 than in QTP 8.2?
What is the use of environment variables?