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

Syntax:     EXPAND(<expC1>[,<expN>][,<expC2>)

Arguments:  <expC1> is the string to be processed.
            <expN> denotes the number of <expC2> characters to be
            inserted between each character in <expC1> (Default: 1).
            <expC2> contains the character to be inserted between each
            character in <expC1>.

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

Usage:      EXPAND() can, for example, be used to generate unreadable
            texts.  Although the texts will be stored normally, this will
            save storage capacity in the case of files or databases.

Notes:      Expansion will only take place if at least two characters are
            contained in <expC1>.  If <expC2> is not passed then a
            space is used.  (Use the functions PADRIGHT() and PADLEFT()
            to fill out a string at the ends.)

Library:    CT1.LIB


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

Examples:   * Passwords
            * Expand with a space.
            ? EXPAND("123456")                  && "1 2 3 4 5 6"


            * Expand with two spaces in each case.
            ? EXPAND(123456",2)                 && "1  2  3  4  5  6"


            * Expand with a "."
            ? EXPAND(123456",".")               && "1.2.3.4.5.6"


            * Expand with two "." in each case.
            ? EXPAND(123456",2,".")             && "1..2..3..4..5..6"




See Also: PADLEFT() PADRIGHT()

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