I am very new to VBscript. Could any one let me know please how to read a number, reverse it and insert a full stop '.' between all digits (input 1234567890 output 0.9.8.7.6.5.4.3.2.1)
Actually, there is reverse string function in vbs.
Code:
strInput = "1234567890"
strRev = [red]StrReverse(strInput)[/red]
strOutput = ""
for i = 1 to len(strRev)
strOutput = strOutput & mid(strRev, i, 1) & "."
next
'take off the last stop
strOutput = left(strOutput, len(strOutput) - 1)
-Geates
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding
"There are seldom good technological solutions to behavioral problems."
- Ed Crowley, Exchange guru and technology curmudgeon
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.