well, tokens are parts of the string based upon specific DELIMITERS
. what do mean?
take this example:
"I am a sentence."
there are 4 words (i think :P,counting the 'a') in it. How do we count words? what identifies one word from the next? SPACES
. in other words, it is a SPACE DELIMITED
let's break it down in mIRC:
note: the ascii number that represents the SPACE character is 32.
//echo -a * There are $numtok(This is a sample string., 32
) SPACE DELIMITED tokens in: This is a sample string.
//echo -a * The 1st one is: $gettok(This is a sample string.,1,32)
//echo -a * The 2nd one is: $gettok(This is a sample string.,2,32)
//echo -a * And the last one is: $gettok(This is a sample string.,5,32)
hope this help