text...peat(3tcl)
π textutil::repeat β or, as I like to call it, the "say it again, bestie" page π
okay so real talk: this little cutie lives in the text...peat(3tcl) manual, which is the Text and string utilities, macro processing corner of the Tcl universe. she's tiny. she's powerful. she makes long strings out of short strings. periodt. β¨
πΈ NAME πΈ
textutil::repeat β procedures to repeat strings. that's it. that's the whole job. and she does it flawlessly. π
β¨ SYNOPSIS β¨
package require Tcl 8.5 9
package require textutil::repeat ?0.8?
::textutil::repeat::strRepeat text num
::textutil::repeat::blank num
note the ?0.8? β that's the optional-version notation, bestie, not me being cute. (okay it's also me being cute. but it's also the notation.) π
π¦ DESCRIPTION π¦
so the textutil::repeat package hands you commands that generate long strings by repeating a shorter string many times. that's the vibe. that's the entire vibe. π
the complete set of procedures is described below, and yes, I said complete, because there are literally two of them and we are not skipping anybody. π
π ::textutil::repeat::strRepeat text num
this command returns a string containing the text repeated num times. the repetitions are joined without any characters between them β no spaces, no commas, nothing, they're just glued together like besties in a group photo. π«Ά
if num is <= 0, the command returns an empty string. no drama, no error, just nothing. iconic restraint honestly.
Note: if the Tcl core the package is loaded in provides the command string repeat, then this command will be implemented in its terms, for maximum possible speed. otherwise a fast implementation in Tcl will be used. either way you get speed, she's just showing off. π₯
π ::textutil::repeat::blank num
a convenience command. returns a string of num spaces. that's it. that's the whole thing. sometimes you just need num spaces and you need them now, and this is the girly who delivers. β¨
π BUGS, IDEAS, FEEDBACK π
ngl, this document, and the package it describes, will undoubtedly contain bugs and other problems. it's giving "we're all just doing our best". please report such in the category textutil of the Tcllib Trackers:
http://core.tcl.tk/tcllib/reportlist
also please report any ideas for enhancements you may have for either the package and/or the documentation. we want the glow-up, we welcome the glow-up. π
when proposing code changes, please provide unified diffs, i.e. the output of diff -u. that's the love language. π₯°
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. that's the whole treasure map, go forth. π§
π SEE ALSO π
β KEYWORDS β
blanks, repetition, string
π CATEGORY π
Text processing
okay bestie that's the whole page, and now the cute sign-off: this is tcllib, version 0.8, and the page itself answers to text...peat(3tcl). she's short, she's sweet, she repeats things, and she ate. no cap. π
β¨π
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms