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>replall()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
REPLALL()

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

Arguments:  <expC1> is the string to be processed.
            <expC2> is the character to replace the <expC3> character
            occuring at the start and end of the <expC1> string.
            <expC3> is the character to be replaced at the start and
            end of <expC1> by <expC2>.

Returns:    A character string.
            The processed <expC1> string.

Usage:      REPLALL() can be used, for example, to replace all leading
            and trailing spaces with another character.

Notes:      Spaces will be replaced by another character in the absence
            of the <expC3> argument.

Library:    CT1.LIB


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

Examples:   * Replace spaces with hyphens.
            * Only replacce on the side on which the
            * character was found.
            ? REPLALL("abcd  ","-")                     && "abcd--"

            * Replace blancks with spaces.
            ? REPLALL("001234"," ","0")                 &&   1234"

            * Replace spaces with hyphens on both sides.
            ? REPLALL("   b   ","-")                    && "---b---"

            * Only the characters at the start
            * and end of the string are replaced.
            ? REPLALL(" d d  ","-")                     && "-d d--"



See Also: REPLLEFT() REPLRIGHT()

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