how to reverse the string without using bultin functions(i.e
mean mid,len ,reverse functions)

Answers were Sorted based on User's Feedback



how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)..

Answer / bantanahal haribabu

using regular exp=======
set Obj=New RegExp
Obj.pattren="[a-z]"
obj.global=true
set obje1=obj.execute(str)
for each letter in obje1
result=letter.value&result
next
print result

Is This Answer Correct ?    5 Yes 0 No

how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)..

Answer / chaitanya

set Obj=New RegExp
Obj.pattren="[a-zA-Z]"
obj.global=true
set obje1=obj.execute(str)
for each letter in obje1
result=letter.value&result
next
print result

Is This Answer Correct ?    1 Yes 0 No

how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)..

Answer / kishan

'how to reverse the string without using bultin
functions(i.e mean mid,len ,reverse functions)

option Explicit

Dim Str, Reverse, i

Str = "India"
Reverse = ""

msgbox len(Str) 'returns 5

for i=len(Str) to 1 step -1

Reverse=Reverse&mid(Str,i,1)

next

msgbox Reverse

Is This Answer Correct ?    1 Yes 0 No

how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)..

Answer / gabbar singh

Just handling special chars also. addition to chaitanya's answer

Set r=new regexp
r.global=true
r.pattern="[a-z A-Z 0-9 \W]"
srcstring="sdsd1212@!@"
Set s=r.execute(srcstring)
For each letter in s
result=letter.value&result
Next
msgbox result

Is This Answer Correct ?    1 Yes 0 No

how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)..

Answer / uday

A small correction in the above expression.
Obj.pattren="[a-z A-Z]"
which revers the string with any CAPs Letters also, else it
will ignore the CAPS Letter.

Is This Answer Correct ?    0 Yes 0 No

how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)..

Answer / pravati

str="This is india"
x=split(str," ")
for i=ubound(x) to 0 step -1
msgbox x(i)
next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Difference between test object and run time object?

0 Answers  


What are Add-ins availble in licensed version QTP8.2

1 Answers   TCS,


When to Insert transactions in QTP?

3 Answers   Siemens,


how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?

3 Answers   HCL,


What are the data types in qtp?

0 Answers  






do you prepared framework,pls answer this

1 Answers  


If we are record a same web page for 2 times.1st time it is showing 6 objects in the Object Repository and for the 2nd time it is showing like 7 Objects in the Object Repository why it is happening

4 Answers   Kanbay,


Hi all, On recording a particular Web application with QTP,Have came across a problem for which I havent found a solution so far.. The script of importance is as follows: Browser("Personalized Start Page").Page("XYZ").Frame ("mainFrame_4").Link("address.csv").Click Browser("Personalized Start Page").Page("XYZ").Sync Dialog("0% of dms.php from XYZ-").Dialog("File Download").WinButton("Save").Click My problem is that on recording the application with QTP and clicking the "address.csv" link another browser window comes up temporarily followed by the Windows "FileSave" dialog.The browser window which came up closes down when the Windows "FileSave" dialog is visible and I save the file to a windows location. On the "Record and Run" settings under Qtp,have activated settings for web and windows applications. But when I run this recorded script,and after the "address.csv" click,The browser window comes up and goes down,No Windows "FileSave" dialog comes up and the QTP shows the error Dialog("0% of dms.php from XYZ-") object is not found,though this object is there in the repository. Have tried putting the Dialog("0% of dms.php from XYZ- ").Exist property.But the "Exist" property is not recognised by the dialog at all. Any help in this direction is appreciated.. Thanks in advance J

1 Answers   ADP,


Discuss QTP Environment.

1 Answers  


What is XML checkpoint in QTP. How we can use in Web Based application

2 Answers   LinkEdge,


difference between waitProperty & Checkproperty

4 Answers   AON,


What is action?

0 Answers  


Categories