SUNiNET - Your Eggdrop & TCL resources site
[ Home Eggdrop TCL Links About ]

Guide to TCL scripting for Eggdrop 1.6


[ Previous ] [ Index ] [ Next ]


9.3 Determining how many characters a string has

This can be done with the string length command.
The syntax of a string length command is string length <string>.

The <string> is the string from which the characters must be retrieved.
This can be anything from a string as in variable to a command.

The string length command outputs a string that contains a number which equals the amount of characters the string has.
If you were to input a list which contains an object that is defined with braces, the braces will also be regarded as characters in the string and not as items to designate a start and top of an object. For example, string length "test {foo bar} temp" would return 19 including the braces and not 17.


[ Previous ] [ Index ] [ Next ]


Design & Graphics by Shawn Borton
Copyright © 2000-2005 Marijn van Zon