how to reverse the string without using bultin functions(i.e
mean mid,len ,reverse functions)
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
What is Automation frame work.How we will prepare in real time.
Hi im new in Testing..can any one plz re-write this code SystemUtil.Run "C:\Program Files\Mozilla Firefox\firefox.exe","","C:\Program Files\Mozilla Firefox","open" ----using for loop(for i=0;i<=10;i++ )
I have enrolled for a QTP course which is a four weekend course.Do you think its a good way to start off learning this tool?What all do i need with me in order to become a pro at using this tool?
Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?
What is the latest version of QTP? aster googling i found it 9.5 . but somewhere in my frnds resume i hve seen 10.0 so i am a bit confused pls let me know.
What is keyword view and Expert view in QTP?
how u test a frame in a web page using QTP?
Can we Test Welcome Screens and Process Images with QTP
Will QTP gets installed on virtual PC.What is the maintenance number to be given
wt is the use of multiple questions in QTP
What are the general steps involved in the data driven framework?
Can anybody send me the code to get the RO property of the active screen in QTP while running?