1[vset TU_STRING_VERSION 0.8] 2[manpage_begin textutil::string n [vset TU_STRING_VERSION]] 3[see_also regexp(n)] 4[see_also split(n)] 5[see_also string(n)] 6[keywords capitalize] 7[keywords chop] 8[keywords {common prefix}] 9[keywords formatting] 10[keywords prefix] 11[keywords string] 12[keywords uncapitalize] 13[moddesc {Text and string utilities, macro processing}] 14[titledesc {Procedures to manipulate texts and strings.}] 15[category {Text processing}] 16[require Tcl 8.2] 17[require textutil::string [opt [vset TU_STRING_VERSION]]] 18[description] 19 20The package [package textutil::string] provides miscellaneous string 21manipulation commands. 22 23[para] 24 25The complete set of procedures is described below. 26 27[list_begin definitions] 28 29[call [cmd ::textutil::string::chop] [arg string]] 30 31A convenience command. Removes the last character of [arg string] and 32returns the shortened string. 33 34[call [cmd ::textutil::string::tail] [arg string]] 35 36A convenience command. Removes the first character of [arg string] and 37returns the shortened string. 38 39[call [cmd ::textutil::string::cap] [arg string]] 40 41Capitalizes the first character of [arg string] and returns the 42modified string. 43 44[call [cmd ::textutil::string::capEachWord] [arg string]] 45 46Capitalizes the first character of word of the [arg string] and 47returns the modified string. Words quoted with either backslash or 48dollar-sign are left untouched. 49 50[call [cmd ::textutil::string::uncap] [arg string]] 51 52The complementary operation to [cmd ::textutil::string::cap]. Forces 53the first character of [arg string] to lower case and returns the 54modified string. 55 56[call [cmd ::textutil::string::longestCommonPrefixList] [arg list]] 57[call [cmd ::textutil::string::longestCommonPrefix] [opt [arg string]...]] 58 59Computes the longest common prefix for either the [arg string]s given 60to the command, or the strings specified in the single [arg list], and 61returns it as the result of the command. 62 63[para] 64 65If no strings were specified the result is the empty string. If only 66one string was specified, the string itself is returned, as it is its 67own longest common prefix. 68 69[list_end] 70 71[vset CATEGORY textutil] 72[include ../common-text/feedback.inc] 73[manpage_end] 74