How to remove the spaces in a string
Ex: "this is apple"

Answers were Sorted based on User's Feedback



How to remove the spaces in a string Ex: "this is apple"..

Answer / shashank shekhar raj

Hai,

Try this it's much easier

x="This is apple"
x=replace("This is apple"," ","")
MsgBox x

REPLACE is function in which i replace whitespace (" ")
by no space ("")

Is This Answer Correct ?    25 Yes 1 No

How to remove the spaces in a string Ex: "this is apple"..

Answer / kamepalli

a=split("this is apple"," ")
b=a(0)+a(1)+a(2)

msgbox b.

Is This Answer Correct ?    11 Yes 6 No

How to remove the spaces in a string Ex: "this is apple"..

Answer / anand

x= "This is VBScript"
y = Split(x)
msgbox join(y,"")

Is This Answer Correct ?    7 Yes 2 No

How to remove the spaces in a string Ex: "this is apple"..

Answer / eswar

s = "this is apple"
x = Split(s," ")
For each i in x
y=y&i
Next
MsgBox y

Is This Answer Correct ?    5 Yes 2 No

How to remove the spaces in a string Ex: "this is apple"..

Answer / saradarao.v

hi Kamepalli.

i am knew to qtp.how i will get real time exp in qtp.

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More VB Script Interview Questions

what is the function to display current date?

4 Answers  


Create a file system object to do the following i. Create a folder ii. Create a text file in the folder iii. Update text file with some tex

2 Answers  


What is the equivalent of VBScript?s On Error In Jscript ?

1 Answers   Microsoft,


What is the technology used by vb script?

0 Answers  


What are the 2 ways in which a variable can be declared in the vbscript language?

0 Answers  






How can constants be declared in the vbscript language?

0 Answers  


Explain about operator precedence in vb script?

0 Answers  


how to genarate a random numbers in vb?

2 Answers  


i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me

0 Answers  


Mention what is select case statement?

0 Answers  


How to create a function in vbscript?

0 Answers  


How to insert snapshot during manual scripting in QTP?

1 Answers  


Categories