1[manpage_begin textutil::string n 0.7] 2[moddesc {Text and string utilities, macro processing}] 3[titledesc {Procedures to manipulate texts and strings.}] 4[category {Text processing}] 5[require Tcl 8.2] 6[require textutil::string [opt 0.7]] 7[description] 8 9The package [package textutil::string] provides miscellaneous string 10manipulation commands. 11 12[para] 13 14The complete set of procedures is described below. 15 16[list_begin definitions] 17 18[call [cmd ::textutil::string::chop] [arg string]] 19 20A convenience command. Removes the last character of [arg string] and 21returns the shortened string. 22 23[call [cmd ::textutil::string::tail] [arg string]] 24 25A convenience command. Removes the first character of [arg string] and 26returns the shortened string. 27 28[call [cmd ::textutil::string::cap] [arg string]] 29 30Capitalizes the first character of [arg string] and returns the 31modified string. 32 33[call [cmd ::textutil::string::uncap] [arg string]] 34 35The complementary operation to [cmd ::textutil::string::cap]. Forces 36the first character of [arg string] to lower case and returns the 37modified string. 38 39 40[call [cmd ::textutil::string::longestCommonPrefixList] [arg list]] 41[call [cmd ::textutil::string::longestCommonPrefix] [opt [arg string]...]] 42 43Computes the longest common prefix for either the [arg string]s given 44to the command, or the strings specified in the single [arg list], and 45returns it as the result of the command. 46 47[para] 48 49If no strings were specified the result is the empty string. If only 50one string was specified, the string itself is returned, as it is its 51own longest common prefix. 52 53[list_end] 54 55 56[section {BUGS, IDEAS, FEEDBACK}] 57 58This document, and the package it describes, will undoubtedly contain 59bugs and other problems. 60 61Please report such in the category [emph textutil] of the 62[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. 63 64Please also report any ideas for enhancements you may have for either 65package and/or documentation. 66 67 68[see_also regexp(n) split(n) string(n)] 69[keywords string capitalize formatting prefix uncapitalize] 70[keywords chop {common prefix}] 71[manpage_end] 72