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

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

Arguments:  <expC1> is the string to be processed.
            <expN> denotes the tab width.
            <expC2> contains the symbol used to fill up to a tab
            position.

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

Usage:      TABEXPAND() will replace all tab characters (CHR(9)) in the
            <expC1> string by the corresponding number of spaces or
            <expC2>.  Different tab widths can be set via <expN>.

Notes:      TABEXPAND() will default to a tab width of 8 in the absence
            of <expN> argument.  If the <expC2> character is not
            specified, then the function defaults to a space as a fill
            character.  The carriage return and line feed, where the high
            but is set, is taken into consideration.

Library:    CT1.LIB


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

Examples:   * Always fill only up to the next tabulator
            * position.
            ? TABEXPAND("-"+CHR(9)+"!")                 && "-        !"
            ? TABEXPAND("....."+CHR(9)+"!")             && ".....        !"

            * It will be possible to fill with any
            * character.
            ? TABEXPAND("-"+CHR(9)+"!","+")             && "-++++++++!"

            * It will be possible to select the
            * tabulator width.
            ? TABEXPAND("-"+CHR(9)+"!",4)               && "-    !"
            ? TABEXPAND("----"+CHR(9)+"!",4)            && "----    !"
            ? TABEXPAND("----"+CHR(9)+"!",4,"+")        && "----++++!"



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