VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Reverse String

by Filipe Resendes (1 Submission)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 5th January 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Reverse String

API Declarations


Public strRevertida As String

Rate Reverse String




Function strReverse(str As String)

Dim var As String
Dim i As Integer

i = Len(str)

While i > 0
    var = var & Mid$(str, (i), 1)
    i = i - 1
Wend

strReverse = var

End Function


Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    strRevertida = strReverse(Text1.Text)
    MsgBox strRevertida
    Text1.Text = ""
    KeyAscii = 0
End If
End Sub

Download this snippet    Add to My Saved Code

Reverse String Comments

No comments have been posted about Reverse String. Why not be the first to post a comment about Reverse String.

Post your comment

Subject:
Message:
0/1000 characters