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 search word in a string without using instring function?

1 Answers   CSS Corp,


How will you reverse a string in vbscript?

0 Answers  


Is vbscript a case-sensitive or case-insensitive?

0 Answers  


How to Import data from a file (file is on the desktop) to the data table

1 Answers   IBM,


write a vb script to display the code "vbscripting" alphabet by alphabet(i e 1st v then b and up to g)

2 Answers  






What are the special sub-types in vbscript?

0 Answers  


How to write Descriptive programming in .VBS file i wrote this code but it is giving error.. Dim qtApp set qtApp=createobject("QuickTest.Application") qtApp.Launch qtApp.Visible=True Set objIE = CreateObject("InternetExplorer.Application") objIE.visible = True objIE.Navigate "www.gmail.com" browser("title:=gmail").title("title:=gmail")

2 Answers  


In html file what is an ideal position to include vbscript?

0 Answers  


How will you convert a string to upper case string using vbscript?

0 Answers  


How can you have different number of cells for each row of a table in HTML?

2 Answers  


Here in my automation tool, i am retreiving some values and i need to store this values in the excel. How can i achieve this?. We are using VBA as scripting language. please let me know if you require any further inputs.

1 Answers  


How to use Text file (Notepad) as ur data source in QTP? Can u please provide some function code for it?

1 Answers  


Categories