Textutil
Author: d | 2025-04-24
The package textutil provides commands that manipulate strings or texts (a.k.a. long strings or string with embedded newlines or paragraphs). It is actually a bundle providing the commands of the six packages. textutil::adjust textutil::repeat textutil::split textutil::string textutil::tabify textutil::trim. in the namespace textutil. It is actually a bundle providing the commands of the six packages textutil::adjust textutil::repeat textutil::split textutil::string textutil::tabify textutil::trim in the namespace textutil. The bundle is deprecated, and it will be removed in a future release of Tcllib, after the next release.
GitHub - ummeTooba/textutils: TextUtils is a
[ Tcllib Table Of Contents | Tcllib Index ] textutil::split(n) 0.7 "Text and stringutilities, macro processing"Nametextutil::split - Procedures to split textsSynopsispackage require Tcl 8.2package require textutil::split ?0.7?::textutil::split::splitn string ?len?::textutil::split::splitx string ?regexp?DescriptionThe package textutil::split providescommands that split strings by size and arbitrary regularexpressions.The complete set of procedures is described below.::textutil::split::splitn string ?len?This command splits the given string intochunks of len characters and returns a listcontaining these chunks. The argument lendefaults to 1 if none is specified. A negativelength is not allowed and will cause the command to throw an error.Providing an empty string as input is allowed, the command willthen return an empty list. If the length of the string is not an entire multiple of the chunk length,then the last chunk in the generated list will be shorter than len.::textutil::split::splitx string ?regexp?This command splits the string and return alist. The string is split according to the regular expression regexp instead of a simple list of chars. Note thatif you parentheses are added into the regexp,the parentheses part of separator will be added into the resultlist as additional element. If the string isempty the result is the empty list, like for split. If regexp is empty the string is split atevery character, like split does. The regular expressionregexp defaults to "[\\t \\r\\n]+".Bugs, Ideas, FeedbackThis document, and the package it describes, will undoubtedlycontain bugs and other problems. Please report such in the categorytextutil of the Tcllib Trackers. Pleasealso report any ideas for enhancements you may have for eitherpackage and/or documentation.Copyright © 2015. The package textutil provides commands that manipulate strings or texts (a.k.a. long strings or string with embedded newlines or paragraphs). It is actually a bundle providing the commands of the six packages. textutil::adjust textutil::repeat textutil::split textutil::string textutil::tabify textutil::trim. in the namespace textutil. It is actually a bundle providing the commands of the six packages textutil::adjust textutil::repeat textutil::split textutil::string textutil::tabify textutil::trim in the namespace textutil. The bundle is deprecated, and it will be removed in a future release of Tcllib, after the next release. TextUtil use TextUtil; use TextUtil qw(:all); module provides the following functions: AddNumberSuffix, ContainsWhiteSpaces, GetTextFileDataByNonUniqueKey textutil. Manipulate text files in various formats. Syntax textutil -info [options] file textutil -convert fmt [options] file textutil -cat fmt [options] file textutil -help [options] file Key -info Display information about the specified files. NAME. textutil - Procedures to manipulate texts and strings. SYNOPSIS package require Tcl 8.2 package require textutil? 0.7.1 ?::textutil::adjust string args NAME. textutil - Procedures to manipulate texts and strings. SYNOPSIS package require Tcl 8.2 package require textutil? 0.7.1 ?::textutil::adjust string args textutil::trimEmptyHeading string regexp above defaults to [ t r n] textutil::expand Note: This command comes in its own package; textutil::expander The command line tool textutil allows you to quickly convert text files to many other useful formats and perform other text manipulation tasks. Additional help and options for textutil can be found by summarizing the help tool, or referring to the man page: textutil -help. Or to get the complete manual page on textutil: man textutilComments
[ Tcllib Table Of Contents | Tcllib Index ] textutil::split(n) 0.7 "Text and stringutilities, macro processing"Nametextutil::split - Procedures to split textsSynopsispackage require Tcl 8.2package require textutil::split ?0.7?::textutil::split::splitn string ?len?::textutil::split::splitx string ?regexp?DescriptionThe package textutil::split providescommands that split strings by size and arbitrary regularexpressions.The complete set of procedures is described below.::textutil::split::splitn string ?len?This command splits the given string intochunks of len characters and returns a listcontaining these chunks. The argument lendefaults to 1 if none is specified. A negativelength is not allowed and will cause the command to throw an error.Providing an empty string as input is allowed, the command willthen return an empty list. If the length of the string is not an entire multiple of the chunk length,then the last chunk in the generated list will be shorter than len.::textutil::split::splitx string ?regexp?This command splits the string and return alist. The string is split according to the regular expression regexp instead of a simple list of chars. Note thatif you parentheses are added into the regexp,the parentheses part of separator will be added into the resultlist as additional element. If the string isempty the result is the empty list, like for split. If regexp is empty the string is split atevery character, like split does. The regular expressionregexp defaults to "[\\t \\r\\n]+".Bugs, Ideas, FeedbackThis document, and the package it describes, will undoubtedlycontain bugs and other problems. Please report such in the categorytextutil of the Tcllib Trackers. Pleasealso report any ideas for enhancements you may have for eitherpackage and/or documentation.Copyright © 2015
2025-04-07