a;;b;c;;;d in this string output is abcd will come how can we
do that in vbscript in QTP testing?

Answers were Sorted based on User's Feedback



a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?..

Answer / eswar

s = "a;;b;c;;;d"
For i=1 to len(s)
x = Mid(s,i,1)
If x <> ";" Then
y=y&x
End If
Next
MsgBox y

Is This Answer Correct ?    2 Yes 0 No

a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?..

Answer / sadashiva @ wipro

str="a;;b;c;;;d"
a=len(str)
for i=1 to a
b=replace(str,";","")
next
msgbox b

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More VB Script Interview Questions

we executed QTP scripts in one browser(i.e IN)same scripts is working on another browsers or not (i.e mean netscap,m azol..like )

6 Answers   Accenture,


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

0 Answers  


write a vb script to display factorial of a number using function

1 Answers  


Whenever I use Wscript.Echo Qtp raising Run time error as 'Object required for Wscript' How I can create object for Wscript

1 Answers  


Mention what is vbscript?

0 Answers  






which is the best institute in banglaore for software testing?

1 Answers  


input values to accept 2 numbers & print the product, difference and sum using switch case

1 Answers   CSC,


Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?

0 Answers   Microsoft,


What are events in the vbscript language?

0 Answers  


Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder

0 Answers   IBM,


How many types of procedures are available in the vbscript language?

0 Answers  


Explain about filter expression?

0 Answers  


Categories