This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.




textutil::tabify(n)              Text and string utilities, macro processing             textutil::tabify(n)



____________________________________________________________________________________________________________

NAME
       textutil::tabify - Procedures to (un)tabify strings

SYNOPSIS
       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?

____________________________________________________________________________________________________________

DESCRIPTION
       The  package  textutil::tabify  provides commands that convert between tabulation and ordinary white-space whitespace
       space in strings.

       The complete set of procedures is described below.

       ::textutil::tabify::tabify string ?num?
              Tabify the string by replacing any substring of num space chars by a tabulation and return the
              result as a new string. num defaults to 8.

       ::textutil::tabify::tabify2 string ?num?
              Similar to ::textutil::tabify this command tabifies the string and returns the result as a new
              string. A different algorithm is used however. Instead of replacing any substring of num  spa-ces spaces
              ces this command works more like an editor. num defaults to 8.

              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.

       ::textutil::tabify::untabify string ?num?
              Untabify  the  string  by  replacing any tabulation char by a substring of num space chars and
              return the result as a new string. num defaults to 8.

       ::textutil::tabify::untabify2 string ?num?
              Untabify the string by replacing any tabulation char by a substring of at most num space chars
              and  return  the  result  as  a  new string. Unlike textutil::tabify::untabify each tab is not
              replaced by a fixed number of space characters.  The command overlays each line in the  string
              with tabstops every num columns instead and replaces tabs with just enough space characters to
              reach the next tabstop. This is the  complement  of  the  actions  taken  by  ::textutil::tab-ify::tabify2. ::textutil::tabify::tabify2.
              ify::tabify2. num defaults to 8.

              There  is  one  asymmetry though: A tab can be replaced with a single space, but not the other
              way around.


BUGS, IDEAS, FEEDBACK
       This document, and the package it describes,  will  undoubtedly  contain  bugs  and  other  problems.
       Please   report   such   in   the  category  textutil  of  the  Tcllib  SF  Trackers  [http://source-
       forge.net/tracker/?group_id=12883].  Please also report any ideas for enhancements you may  have  for
       either package and/or documentation.

SEE ALSO
       regexp(n), split(n), string(n)

KEYWORDS
       formatting, string, tabstops



textutil                                             0.7                                 textutil::tabify(n)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...