1 out of 1 rated this helpful - Rate this topic

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
Expression

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

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

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


Namespace: Microsoft.VisualBasic

Module: Strings

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

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ