Visual Basic Language Reference  

StrReverse Function

Returns a string in which the character order of a specified string is reversed.

Public Function StrReverse(ByVal Expression As String) As String

Parameters

Expression
Required. String expression whose characters are to be reversed. If Expression is a zero-length string (""), a zero-length string is returned.

Example

Dim myString As String = "ABCDEFG"
Dim revString As String
' Returns "GFEDCBA"
revString = StrReverse(myString)

See Also

InStrRev Function