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

Which operator is used to concatenate the 2 values in the vbscript language?

0 Answers  


What is the difference between javascript and vbscript?

0 Answers  


how to set one column as primary key in QTP and fetch values accordingly

0 Answers   Ford,


How do you get the value of a combo box in Javascript?

2 Answers   Aspire,


What are the data types supported by vbscript?

0 Answers  






What is variant in vb script?

0 Answers  


give me any information abou vb script books learn quckly

0 Answers  


Hi I don't have any idea on VBscript. can any one point me to a good web site to learn VBscript. Regards lina

2 Answers  


Explain about operator precedence in vb script?

0 Answers  


Explain about .wsf files?

0 Answers  


find the length of the string without using length function?

4 Answers   CSS Corp,


How will you get the natural logarithm of the given number in vbscript?

0 Answers  


Categories