Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>rangerepl()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
RANGEREPL()

Syntax:     RANGEREPL(<expC1>,<expC2>,[@]<expC3>,<expC4>)

Arguments:  <expC1> and <expC2> determine the range of characters to
            be replaced.
            <expC3> is the string to be processed.
            <expC4>) is the replacement character.

Returns:    A character string.
            The processed string is returned.

Usage:      All characters in a particular range may be replaced by a
            new character.  For example, it is possible to replace all
            control characters with a space.

Notes:      The length of <expC3> is not changed by this function.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * Replace all control characters in a string
            * by the character ".".
            string = "a"+CHR(5)+"b"+CHR(9)

            ? RANGEREPL(CHR(0),CHR(31),string,".")      && "a.b."

            * It is possible to specify "" instead of
            * CHR(0).  Exchange all characters with codes
            * less than "A" with the figure "0".
            RANGEREPL("",CHR(65),"123400","0")          && "000000"

            * Replace all characters in the range "0" to
            * "8" with "9".
            RANGEREPL("0","8","0212 - 78 67 43","9")    && "9999 - 99 99 99"



See Also: CHARREPL() POSREPL()

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