Converts tabs to spaces

        [<cCharacter|nCharacter>]) --> cString


     <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).


     The modified <cString> is returned.


     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


     .  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.


     .  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()


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.