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

How to select a value from a list box by using Selenium web-driver?

2 Answers   HCL,


How should i Create Email invite with server-side Coding?

0 Answers   Altair,


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

1 Answers   CSC,


How are comments handled in the vbscript language?

0 Answers  


What's the difference between vbscript and vb.net?

0 Answers  


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

5 Answers   Cap Gemini,


What is the scope of a constant declared using public?

0 Answers  


Write VB script to convert from feet to inches(hint 1feet=12 inches)

2 Answers  


Which operator can be used to do an xor operation in vbscript?

0 Answers  


how to automatically update the sql server2005 database records when insert in vb6?

0 Answers  


How to write VB Script for selecting a particular row in a WebTable?

1 Answers   Patni,


write a vb script code to display the vbscript word by word (i e 1st it should display v then b and up to t )

1 Answers  


Categories