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 |
Is VBscript case-sensitive?
How to use Text file (Notepad) as ur data source in QTP? Can u please provide some function code for it?
In what way program "hello world" you can write in vbscript?
Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.
why variable name should not exceed 255 characters?
How to map test cases with Automation script? Please explain in details.With example Thanks for your co-operation(In Advance)
int a=4857 i need output as 7584.without using any inbuild function?
Which data type/types are supported by vbscript language and what are their specialties?
Out of the different type of operators, which are evaluated first and last in the vbscript language?
i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click
Plz give the vb script for the following scenerio. In travel booking we have to select from delhi to mumbai from the combobox The prices will be display in another combo box .But i have to select the lowest price for it and submit it
The function template cocept is implemented in vb.net is ???