StrReverse |
| Description: | |
| This function simply reverses a string. It's similar to VB6's StrReverse function, this is another function that I wrote so I could have this functionality in VB5. | |
| Code: | |
Public Function StrReverse(sIn As String) As String
StrReverse = Space(Len(sIn))
Dim i As Long
For i = 1 To Len(sIn)
Mid(StrReverse, Len(sIn) - (i - 1), 1) = Mid(sIn, i, 1)
Next
End Function
| |
| Sample Usage: | |
Debug.Print StrReverse("!tset a tsuj si sihT")
| |