$numtok: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Doomie (talk | contribs)
No edit summary
(No difference)

Revision as of 16:16, 16 October 2005

Returns the number of tokens in a text.

$numtok(text,C

The C parameter is the ascii value of the character separating the tokens.

Note that it's exactly the same as $gettok(text,0,C).

Example

echo -ag $numtok(This is a test,32)

This will return 4, as This is a test constists of 4 words.