SIMPLE SOLUTIONS

TEXTUTIL_STRING(3TCL) - Linux man page online | Library functions

Procedures to manipulate texts and strings.

Chapter
0&.8
textutil::string(3tcl) Text and string utilities, macro processing textutil::string(3tcl) _________________________________________________________________________________________________

NAME

textutil::string - Procedures to manipulate texts and strings.

SYNOPSIS

package require Tcl 8.2 package require textutil::string ?0.8? ::textutil::string::chop string ::textutil::string::tail string ::textutil::string::cap string ::textutil::string::capEachWord string ::textutil::string::uncap string ::textutil::string::longestCommonPrefixList list ::textutil::string::longestCommonPrefix ?string...? _________________________________________________________________________________________________

DESCRIPTION

The package textutil::string provides miscellaneous string manipulation commands. The complete set of procedures is described below. ::textutil::string::chop string A convenience command. Removes the last character of string and returns the short‐ ened string. ::textutil::string::tail string A convenience command. Removes the first character of string and returns the short‐ ened string. ::textutil::string::cap string Capitalizes the first character of string and returns the modified string. ::textutil::string::capEachWord string Capitalizes the first character of word of the string and returns the modified string. Words quoted with either backslash or dollar-sign are left untouched. ::textutil::string::uncap string The complementary operation to ::textutil::string::cap. Forces the first character of string to lower case and returns the modified string. ::textutil::string::longestCommonPrefixList list ::textutil::string::longestCommonPrefix ?string...? Computes the longest common prefix for either the strings given to the command, or the strings specified in the single list, and returns it as the result of the com‐ mand. If no strings were specified the result is the empty string. If only one string was specified, the string itself is returned, as it is its own longest common pre‐ fix. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other prob‐ lems. 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.

SEE ALSO

regexp(3tcl), split(3tcl), string(3tcl)

KEYWORDS

capitalize, chop, common prefix, formatting, prefix, string, uncapitalize

CATEGORY

Text processing
tcllib 0.8 textutil::string(3tcl)
This manual Reference Other manuals
textutil_string(3tcl) referred by
refer to regexp(3tcl) | split(3tcl) | string(3tcl)
Download raw manual
Main page Text and string utilities, macro processing (+8) tcllib (+428) № 3 (+68044)
Go top