textutil::tabify(3tcl) | Text and string utilities, macro processing | textutil::tabify(3tcl) |
textutil::tabify - Procedures to (un)tabify strings
package require Tcl 8.2
package require textutil::tabify ?0.7?
::textutil::tabify::tabify string ?num?
::textutil::tabify::tabify2 string ?num?
::textutil::tabify::untabify string ?num?
::textutil::tabify::untabify2 string ?num?
The package textutil::tabify provides commands that convert between tabulation and ordinary whitespace in strings.
The complete set of procedures is described below.
Each line of the text in string is treated as if there are tabstops every num columns. Only sequences of space characters containing more than one space character and found immediately before a tabstop are replaced with tabs.
There is one asymmetry though: A tab can be replaced with a single space, but not the other way around.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category textutil of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.
regexp(3tcl), split(3tcl), string(3tcl)
formatting, string, tabstops
Text processing
0.7 | tcllib |