Tag example

TCL Substring, How do you do it? 1

Sep14

At first I was a bit confused on how to achieve a substring in TCL. Its not very clear and its not well documented, but in the end I found it.

Here is it:

set string "This is an example string"
putserv "PRIVMSG #channel :Example: [string range $string 0 4]"
# This would message #channel with "Example: This"
# Remember: All strings start at letter number 0.

Hope this helps.

arkinEx Codex is powered by WordPress and FREEmium Theme.
developed by Dariusz Siedlecki and brought to you by FreebiesDock.com