str="uday"
For i=len(str) to 1 step -1
strchar=mid(str,i,1)
resultstr=resultstr&strchar
Next
msgbox resultstr
...or you can use the built-in function in VBScript:
msgbox strreverse("uday")
Alternate Method
Here is how we can Reverse a String without using any functions like len & mid:
Option Explicit
Dim yourstr,r,letter,result,s
yourstr="program"
Set r=new regexp
r.pattern="[a-z A-Z]"
r.global=true
set s=r.execute(yourstr)
For each letter in s
result= letter.value&result
Next
msgbox(result)
SOURCE | LINK | LANGUAGE | ENGLISH |
How to reverse a string using VBScript – http://heelpbook.altervista.org/?p=35903 – 18/02/2013 – 16:00 – HeelpBook – Visit http://www.heelpbook.net OR http://mobile.heelpbook.net on your tablet! #HeelpBook @HeelpBook