Dela via


StrReverse Function (Visual Basic)

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.

Remarks

The StrReverse function returns a string that contains the same characters as Expression, but in the opposite order.

Example

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

Requirements

Namespace:Microsoft.VisualBasic

**Module:**Strings

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

See Also

Reference

String Manipulation Summary

InStrRev Function (Visual Basic)