TABEXPAND()

Replace tabulator control characters with fill characters

Syntax

TABEXPAND (<cString>, [<nTabWidth>], [<cFillChar|nFillChar>],
[<cNewLineCharacters>], [<cTabChar|nTabChar>],
[<lIgnore141>]) -> cExpandedString

Arguments

<cString> <nTabWidth> <cFillChar|nFillChar> <cNewLineCharacters> string indicating new line, default is the string returned by hb_osnewline() <cTabChar|nTabChar> character indicating a tab stop, default is chr(9) <lIgnore141> .T., if the soft-CR used by MEMOEDIT() should be ignored as a newline indicator, default is .F. (functions uses chr(141))

Description

TODO: add documentation
Tests tabexpand("-"+chr(9)+"!") == "- !" tabexpand("----"+chr(9) +"!") == "---- !" tabexpand("-"+chr(9)+"!",, "+") == "-+++++++!" tabexpand("-"+chr(9)+ "!", 4) == "- !" tabexpand("----"+chr(9)+ "!", 8) == "---- !" tabexpand("----"+chr(9)+ "!", 8, "+") == "----++++!" tabexpand("-"+chr(9)+"!"+hb_osnewline()+"----"+chr(9)+ "!",, "+") == "-+++++++!"+hb_osnewline()+"----++++!"
Status

Started

Compliance

TABEXPAND() is compatible with CT3's TABEXPAND(), but there are three new parameters for a better fine control of the function's behaviour.

Platforms

All

Files

Source is tab.c, library is libct.

See Also