From WikiChip
$numtok identifier - mIRC
< mirc‎ | identifiers

$numtok returns the number of $asc(C)-delimited token in a list.


Synopsis[edit]

$numtok(<LIST>,<C>)

Parameters[edit]

LIST: - Text list delimited by a character into tokens
C: - The $asc() value which splits LIST into tokens

Properties[edit]

None

Examples[edit]

Echo to the active window, the number of tokens delimited by the $chr(45) hyphen:

//echo -a $numtok(a-b-c-d-e,45)
; returns 5
//echo -a $numtok(1x2x3x4,120)
; returns 4 because $chr(120) is lower-case x
//echo -a $numtok(x1xxxx2x3x4x,120)
; also returns 4 because duplicate, leading, and trailing delimiters are stripped before $numtok processes the LIST
//echo -a $numtok(1x2X3x4,120)
; returns 3 because the C token is case-sensitive, so capital X isn't a delimiter

Compatibility[edit]

Added: mIRC v5.5
Added on: 08 Jan 1999
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also[edit]

[Expand]
v · d · e mIRC identifier list