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 |
wt is memory leakage?
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
MANUAL TESTING, AUTOMATION TESTING QTP,QC , Load Runner , SELNEIUM ONLINE TRAINING
difference between GetROProperty and GetTOProperty
what is the script to select 2 or more than 2 options from a listbox.
What is the extension of qtp local repository?
What is the extension of script and object repositary files?
i'm using QTP 8.2. A person using QTP 9.0 sends me a QTP TestScript, same when i try to open , an error comes "unexpected file format". Why?? and how to resolve the problem??
what is frame work?
what is the data driven testing?
Why do we go for Qtp? What are the advantages of qtp? Diff between winrunner and Qtp?
Explain about merging of two repositories?