1textutil::repeat(n)Text and string utilities, macro processintgextutil::repeat(n)
2
3
4
5______________________________________________________________________________
6
8 textutil::repeat - Procedures to repeat strings.
9
11 package require Tcl 8.2
12
13 package require textutil::repeat ?0.7?
14
15 ::textutil::repeat::strRepeat text num
16
17 ::textutil::repeat::blank num
18
19______________________________________________________________________________
20
22 The package textutil::repeat provides commands to generate long strings
23 by repeating a shorter string many times.
24
25 The complete set of procedures is described below.
26
27 ::textutil::repeat::strRepeat text num
28 This command returns a string containing the text repeated num
29 times. The repetitions are joined without characters between
30 them. A value of num <= 0 causes the command to return an empty
31 string.
32
33 Note: If the Tcl core the package is loaded in provides the com‐
34 mand string repeat then this command will be implemented in its
35 terms, for maximum possible speed. Otherwise a fast implementa‐
36 tion in Tcl will be used.
37
38 ::textutil::repeat::blank num
39 A convenience command. Returns a string of num spaces.
40
42 This document, and the package it describes, will undoubtedly contain
43 bugs and other problems. Please report such in the category textutil
44 of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please
45 also report any ideas for enhancements you may have for either package
46 and/or documentation.
47
48 When proposing code changes, please provide unified diffs, i.e the out‐
49 put of diff -u.
50
51 Note further that attachments are strongly preferred over inlined
52 patches. Attachments can be made by going to the Edit form of the
53 ticket immediately after its creation, and then using the left-most
54 button in the secondary navigation bar.
55
57 regexp(n), split(n), string(n)
58
60 blanks, repetition, string
61
63 Text processing
64
65
66
67tcllib 0.7.1 textutil::repeat(n)