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 the tristate constants in vbscript?
Which operator can be used to change the value of the operand or change the state of the condition?
What are class events?
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
Explain a few date functions in vbscript
How to replace junk code recorded by QTP with a mall function.
Compare java script and vb script?
Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..
Explain the support of asp for vb script functionality?
how does vb script help in web page designing? explain with example.
Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...
Explain about adodb.stream class?
A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.
Explain different types of segment?
Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function