Hi, Anybody could tell me What is the script for Reverse of
Given number. Ex:236--632. Thanks in Advance..
Answer Posted / parvez
'You can reverse any string with char, num and spl
characters with this code!
Sub StinrgReverse()
Dim sString, sRevString
sString = InputBox("Enter your string: ")
MsgBox sString
sRevString = fStringReverse(sString)
MsgBox sRevString
End Sub
Function fStringReverse(ByVal sBeforeRev)
Dim aStrSplit, sAfterSplit, sAfterRev, aStrRev
iLength = Len(sBeforeRev) - 1
ReDim aStrSplit(iLength) 'Very Important
For i = 0 To iLength
aStrSplit(i) = Mid(sBeforeRev, i + 1, 1)
Next
ReDim aStrRev(iLength) 'Very Important
For j = 0 To iLength
aStrRev(j) = aStrSplit(iLength - j)
Next
sAfterSplit = Join(aStrSplit, ".")
sAfterRev = Join(aStrRev, ".")
sAfterRev = Replace(sAfterRev, ".", "")
fStringReverse = sAfterRev
End Function
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain vbscript in detail?
Explain a few date functions in vbscript
what do you mean .ota mobile format
What is loose binding? Why is it not a good practice to use it?
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
what is the difference between modular and data and keyword driven framework
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
what is diff between static and dynaic arrys?
Which data type/types are supported by vbscript language and what are their specialties?
Explain about constants in vb script?
How to open a file. What is the perpose of true and false mode there?
What are subprocedures in vbscript?
What is variant in vb script?
What is the scope of a constant declared using public?
Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com