vb: how to reverse string?
This site provides users with the information about vb, visual basic, vb6, reverse string, how to reverse string, and more.
If you think that this site is helpful, please recommend your friends to visit our site.
How to reverse string?
The following is the code for how to reverse string:
Dim sLength, t As Long
Dim iString, ch, whole, rString As String
sLength = Len(iString) 'get length of string
For t = sLength To 1 Step -1
ch = Mid(iString, t, 1)
whole = whole & ch
rString = whole 'rString shows the reversed string