[<<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
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson