STRREVERSE

STRREVERSE(string)

Returns the text string with the characters reversed (Variant / String).


stringThe text string (String).

REMARKS
* If "string" = "" (zero length string), then a zero length string is returned.
* If "string" is Null, then an error occurs.
* You can use the STR function to return a text string of a number.
* You can use the STRING function to return a repeating character of a given length.
* You can use the STRREVERSE$ function to return a String data type instead of a Variant data type.
* The equivalent .NET function is Microsoft.VisualBasic.Strings.StrReverse
* For the Microsoft documentation refer to learn.microsoft.com

Debug.Print StrReverse("abcdef")   '= "fedcba"  
Debug.Print StrReverse("ABABAB") '= "BABABA"
Debug.Print StrReverse("one two") '= "owt eno"
Debug.Print StrReverse("123456") '= "654321"
Debug.Print StrReverse(6) '= "6"
Debug.Print StrReverse(600) '= "006"

Dim sResult As String
sResult = StrReverse("BetterSolutions")
Debug.Print sResult '= snoituloSretteB"

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top