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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz

2625


I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.

2006


Explain few date functions in vbscript?

803


What are the valid scopes of a variable in vbscript?

801


What is the use of the instr function?

782


When are redim statement and preserve keyword used in the vbscript language?

811


hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?

1971


what is the object hyrarchy in QTP for a web based application

2091


Explain vbscript in detail?

813


i need to sort the data using qtp script for this how i need to write a qtp script

3436


Mention how to assign a date value to a variable?

812


How will you get the exponent of the given number in vbscript?

767


where can i learn VB scripint ?

1825


Why is the use of exit do or exit for statements within loops discouraged?

764


Out of the different type of operators, which are evaluated first and last in the vbscript language?

762