[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 TABEXPAND()
 Converts tabs to spaces
------------------------------------------------------------------------------
 Syntax

     TABEXPAND(<cString>,[<nTabWidth>],
        [<cCharacter|nCharacter>]) --> cString

 Arguments

     <cString>  Designates the string that is processed.

     <nTabWidth>  Designates the tab width.  The default value is 8.

     <cCharacter|nCharacter>  Designates the characters that are used
     when expanding the tabs.  The default value is a space, CHR(32).

 Returns

     The modified <cString> is returned.

 Description

     The TABEXPAND() function replaces all tab characters (CHR(9)) in
     <cString> with the corresponding number of spaces or <cCharacter|
     nCharacter>.  The <nTabWidth> parameter can be used to set varying tab
     widths.

 Notes

     .  In the absence of the <nTabWidth> parameter, TABEXPAND() has a
        default tab width of 8.

     .  The carriage return and line feed, where the high bit is set,
        are taken into consideration.

     .  SETTABS() does not affect this function.

 Examples

     .  TABEXPAND() only fills to the next tab position:

        ? TABEXPAND("-" +CHR(9) +"!")                  // "-       !"
        ? TABEXPAND("----" +CHR(9) +"!")               // "----    !"

     .  You can fill with any character you like:

        ? TABEXPAND("-" +CHR(9) +"!", "+")             // "-+++++++!"

     .  The tab width can be selected:

        ? TABEXPAND("-" +CHR(9) +"!", 4)               // "-   !"
        ? TABEXPAND("----" +CHR(9) +"!", 8)            // "----    !"
        ? TABEXPAND("----" +CHR(9) +"!", 8, "+")       // "----++++!"


See Also: TABPACK()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson