How to remove the spaces in a string Ex: "Welcome to
QTPWorld" ?
Answers were Sorted based on User's Feedback
Answer / vinay
Str = Welcome to QTP World
Replace(Str," ","")
Result= WelcometoQTPWorld
| Is This Answer Correct ? | 27 Yes | 0 No |
Answer / krishna
Str="Quick Test Pro"
R=Replace(Str," ","")
msgbox R
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / vasudha
Dim str
str="welcome to qtp"
arr=split(str," ")
For i=0 to Ubound(arr)
abc=abc&arr(i)
Next
print abc
| Is This Answer Correct ? | 10 Yes | 3 No |
Answer / mithuna reddy
Dim str,arrsplit,arrjoin
str = "Welcome to QTP World"
arrsplit = Split(str," ")
arrjoin = Join(arrsplit,"")
MsgBox arrjoin
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / lak
Mahe answer is will work only traling and leading the
spaces from a string.But middle spaces can not be removed
from a string.
agree with vinay ,vasudha
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ranni
Trim function will not work,it cannot remove spaces in between words
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / sowjanya
Msgbox Replace("wellcome to qtp world"," ","")
OR
str= "Wellcome to qtp world"
arr=Split(str," ")
for i=0 to Ubound(arr)
abc=abc&arr(i)
next
msgbox abc
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vishnu
Str = "Welcome to QTPWorld"
Sp1=Split(str)
For i=0 to ubound(Sp1)
temp=temp&Sp1(i)
Next
print temp
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / mahesh
Ex::
X="Welcome to QTP World"
Y=trim(X)
Msgbox Y
O/p::WelcometoQTPWorld
| Is This Answer Correct ? | 4 Yes | 29 No |
which is the bset training centre to learn automation tools?
Explain about the functionality of vb script?
hai..friends ....what is the difference between function and sub procedure ....here every one know's theoretically here my question is what is the meaning of function can return the value and sub can't return the value...can you give one example with some values for that ....what does it mean ? how function can return the value...sub can not...any one please...........with example
how to add action through AOM in QTP
Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?
pls tell me which is good book or site for vbscript?
How can constants be declared in the vbscript language?
Which operator can be used to check if two numbers are equal or not in vbscript?
Hi, I need to accept user inputs for login at runtime.I know i can use Inputbox but how to proceed further that i dont know. Thanks in advance
Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).
Explain about the extension .hta?
Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance..