Reverse Text/Flip Text

I know it's old, but I was looking for this but the sub above appeared unoptimized so I made one

Code: Copy
Sub StrReverse(Text As String) As String 
   Dim tempstr As StringBuilder,temp As Int
   tempstr.Initialize 
   For temp = Text.Length-1 To 0 Step -1
      tempstr.Append( Text.CharAt(temp) )
   Next
   Return tempstr.ToString 
End Sub
 
Upvote 1
Back
Top