Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>charmirr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CHARMIRR()
 Mirrors characters within a string
------------------------------------------------------------------------------
 Syntax

     CHARMIRR(<cString>,[<lBlank>]) --> cString

 Arguments

     <cString>  [@]  Designates the character string that is mirrored.

     <lBlank>  Designates whether the function mirrors everything (.F.)
     or does not mirror the blanks at the end of a character string (.T.).
     The default value is .F..

 Returns

     CHARMIRR() returns the processed <cString>.

 Description

     CHARMIRR() reverses a string.  The function returns a palindrome of
     <cString>.

     The optional logical parameter allows you to mirror a string and ignore
     the blanks.  This permits you to build index entries that end with a
     particular sequence.

 Note

     .  The returned value of this function can be suppressed by
        implementing CSETREF() to save room in working memory.

 Examples

     .  This example shows a simple exchange:

        ? CHARMIRR("abc321")         // Result: "123cba"

     .  This example shows one of the best known palindromes:

        ? CHARMIRR("ABLE WAS I ERE I SAW ELBA")

     .  When you index, you must do it without spaces because this is
        the only way a reverse string can be searched for:

        INDEX ON CHARMIRR(Field, .T.) TO Index

     .  Search for all expressions in the mirrored index, ending in
        "per":

        SEEK "rep"


See Also: CSETREF() Introduction

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson