How to remove the spaces in a string Ex: "Welcome to
QTPWorld" ?

Answers were Sorted based on User's Feedback



How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

Answer / vinay

Str = Welcome to QTP World
Replace(Str," ","")


Result= WelcometoQTPWorld

Is This Answer Correct ?    27 Yes 0 No

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

Answer / krishna

Str="Quick Test Pro"
R=Replace(Str," ","")
msgbox R

Is This Answer Correct ?    10 Yes 0 No

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

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

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

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

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

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

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

Answer / ranni

Trim function will not work,it cannot remove spaces in between words

Is This Answer Correct ?    2 Yes 1 No

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

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

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

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

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

Answer / mahe

Using with trim() Method

Is This Answer Correct ?    2 Yes 14 No

How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?..

Answer / mahesh

Ex::

X="Welcome to QTP World"

Y=trim(X)
Msgbox Y

O/p::WelcometoQTPWorld

Is This Answer Correct ?    4 Yes 29 No

Post New Answer

More VB Script Interview Questions

HI how can handle dynamic image through vb script example we have to create email id fill the edit box(these latters change wrong password) i am wating your answer

1 Answers  


hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..

6 Answers  


write any ttest cases using check points and parameterization

0 Answers  


How to create pull down menu box using vb script

0 Answers  


How to Enter Values on the Command promt using VB script

0 Answers  






wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

0 Answers  


How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar"

4 Answers   Cap Gemini,


How to learn VB Script, Since iam working with QTP. So i need to learn VB script.

4 Answers   TCS,


Why is it recommended to close the database connection every time after the work is completed?

0 Answers  


Can automation testing find ssame no. of bugs what we can find by manual testing?

0 Answers  


I am running a windows based application.While running the script on QTP ,The Application pop-up an Error Message as "object Disabled" in two different scenarios Scenario 1-->The Application pop-up up a Message for Max Session Reached(as the application is set to hold 2 session and if if crosses the pre-defined limit then the error message pop-up) Scenario 2-->When Network connectivity is disabled the Application screen gets greyed out in colour with no operation possible. Now through Exception handling features in QTP ,we need to do the following For Scenarion 1-->Through Exception handling we need to just accept the Message pop-up in the Application and and resume with the call function as is for Scenario 2--> Through Exception Handling featutes on QTP we need to shut down the client , restart the client and resume the call functions as it is Note: The Application returns an Error Message as "object disabled" in both the cases i.e for pop-up message and when the Apllication getting greyed out due to Network failure how can we enhance the script in such a way that for the same error message retured by the application in two different and how to handle them????

2 Answers   Sasken,


What are the different types of operators and their order of precedence?

0 Answers  


Categories