| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Reverses the order of characters in a string.
CharMirr( <cString>, [<lNoSpaces>] ) --> cResult
The function reverses the order of the characters in <cString> and returns the result.
| See also: | CharList() |
| Category: | CT:String manipulation , Character functions |
| Source: | ct\charmirr.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays results of CharMirr()
PROCEDURE Main
LOCAL cString1 := "abcdef"
LOCAL cString2 := "xHarbour "
? ">"+CharMirr( cString1 )+"<" // result: >fedcba<
? ">"+CharMirr( cString2 )+"<" // result: > ruobraHx<
? ">"+CharMirr( cString2, .T. )+"<" // result: >ruobraHx <
RETURN
http://www.xHarbour.com