$gettok: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
$gettok page
(No difference)

Revision as of 23:53, 11 October 2005

Returns the Nth token or amount of tokens in string.

$gettok(string,N,C)

Where N is the Nth token you wish to be returned from string by delimiter C. Alternatively N can be given as 0 to return the amount of tokens in string

Example

$gettok(Ave:IT,1,58) returns Ave

This returns the first token using $chr(58) as the delimiter

$gettok(Ave:IT,0,58) returns 2

This returns the value 2 because there is two values when delimited by $chr(58)

Note: N can be a range N1-N2, Example:
$gettok(Word1 Word2 Word3 Word4,2-3,32) returns Word2 Word3