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

Hello Everybody, Please tell me can we create Test Plan in QTP? This I am asking irrespective to integrating with Test Director.I mean is there any option to create Test Plan in QTP itself. Thanks, Gaytri

4 Answers  


Hi,can anyone tell me How to found the number of 1's and 2's in the given format 1,1,2,2,3,3,4,2 using vbscript Thanks in advance

3 Answers  


tell me abt a time when u had to go above &beyind the call of duty to get the job done

0 Answers  


1. How to capture data from images in QTP and produce them in Excel sheet

1 Answers   Broadridge,


there are having 10 checkboxes..how can i check only first 5 check boxes by using descriptive programing..

10 Answers   HealthAsyst,






When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.

0 Answers  


what are the different kinds of frameworks in automation?

1 Answers   Accenture,


hi i have one issue while coding the dates . i want to add the date curret to 4 days . can any one helme plz about this regards balaji

2 Answers  


Wht are the BY default Add-ins in QTP 9.2 version and what all are differences between 8.2 and 9.2

2 Answers   Siemens,


Hello Everybody, Please tell me the concept of recovery management in QTP by giving any practical example of it. Thanks, Gaytri

7 Answers  


What is batch testing?

4 Answers  


How to Map network drive in QTP

3 Answers  


Categories