1textutil::string(n)Text and string utilities, macro processintgextutil::string(n)
2
3
4
5______________________________________________________________________________
6
8 textutil::string - Procedures to manipulate texts and strings.
9
11 package require Tcl 8.2
12
13 package require textutil::string ?0.7?
14
15 ::textutil::string::chop string
16
17 ::textutil::string::tail string
18
19 ::textutil::string::cap string
20
21 ::textutil::string::uncap string
22
23 ::textutil::string::longestCommonPrefixList list
24
25 ::textutil::string::longestCommonPrefix ?string...?
26
27_________________________________________________________________
28
30 The package textutil::string provides miscellaneous string manipulation
31 commands.
32
33 The complete set of procedures is described below.
34
35 ::textutil::string::chop string
36 A convenience command. Removes the last character of string and
37 returns the shortened string.
38
39 ::textutil::string::tail string
40 A convenience command. Removes the first character of string and
41 returns the shortened string.
42
43 ::textutil::string::cap string
44 Capitalizes the first character of string and returns the modi‐
45 fied string.
46
47 ::textutil::string::uncap string
48 The complementary operation to ::textutil::string::cap. Forces
49 the first character of string to lower case and returns the mod‐
50 ified string.
51
52 ::textutil::string::longestCommonPrefixList list
53
54 ::textutil::string::longestCommonPrefix ?string...?
55 Computes the longest common prefix for either the strings given
56 to the command, or the strings specified in the single list, and
57 returns it as the result of the command.
58
59 If no strings were specified the result is the empty string. If
60 only one string was specified, the string itself is returned, as
61 it is its own longest common prefix.
62
64 This document, and the package it describes, will undoubtedly contain
65 bugs and other problems. Please report such in the category textutil
66 of the Tcllib SF Trackers [http://source‐
67 forge.net/tracker/?group_id=12883]. Please also report any ideas for
68 enhancements you may have for either package and/or documentation.
69
71 regexp(n), split(n), string(n)
72
74 capitalize, chop, common prefix, formatting, prefix, string, uncapital‐
75 ize
76
77
78
79textutil 0.7 textutil::string(n)