h1. Token Manipulation {{>toc}} h4. *Token* in [[Scripting|AdiIRC scripting]] are lists of strings that is separated by a single unique character. *Example* The numerical representation of space char in "ASCII":http://www.asciitable.com/ table is *32*, and *44* is for comma.
//set -e %q = which came first, the chicken or the egg?

; Will print 2, because it has a single comma "splitting" the text in two parts.
//echo -ag $numtok(%q, 44)

; Will print 8, because in this case are 8 strings separated by space char.
//echo -ag $numtok(%q, 32)
To help you to manipulate list of tokens, there is an extensive set of identifiers and commands.   h2(box). $addtok {{include($addtok)}} h2(box). $addtokcs {{include($addtokcs)}} h2(box). $deltok {{include($deltok)}} h2(box). $findtok {{include($findtok)}} h2(box). $findtokcs {{include($findtokcs)}} h2(box). $gettok {{include($gettok)}} h2(box). $instok {{include($instok)}} h2(box). $istok {{include($istok)}} h2(box). $istokcs {{include($istokcs)}} h2(box). $matchtok {{include($matchtok)}} h2(box). $matchtokcs {{include($matchtokcs)}} h2(box). $numtok {{include($numtok)}} h2(box). $puttok {{include($puttok)}} h2(box). $remtok {{include($remtok)}} h2(box). $remtokcs {{include($remtokcs)}} h2(box). $reptok {{include($reptok)}} h2(box). $reptokcs {{include($reptokcs)}} h2(box). $sorttok {{include($sorttok)}} h2(box). $sorttokcs {{include($sorttokcs)}} h2(box). $wildtok {{include($wildtok)}} h2(box). $wildtokcs {{include($wildtokcs)}} h2(box). Tokenize {{include(Tokenize)}} h2(box). $* {{include($*)}}