From WikiChip
Difference between revisions of "mirc/identifiers/$numtok"
(→Examples) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{mirc title|$numtok | + | {{mirc title|$numtok identifier}}'''$numtok''' returns the number of $asc(C)-delimited token in a list. |
− | '''$numtok''' returns the number of $asc(C)-delimited token in a list. | + | |
== Synopsis == | == Synopsis == | ||
Line 10: | Line 10: | ||
== Properties == | == Properties == | ||
− | |||
None | None | ||
Line 31: | Line 30: | ||
== See also == | == See also == | ||
+ | * {{mIRC|$addtok}} | ||
+ | * {{mIRC|$deltok}} | ||
* {{mIRC|$gettok}} | * {{mIRC|$gettok}} | ||
* {{mIRC|$findtok}} | * {{mIRC|$findtok}} | ||
+ | * {{mIRC|$instok}} | ||
+ | * {{mIRC|$istok}} | ||
* {{mIRC|$matchtok}} | * {{mIRC|$matchtok}} | ||
− | |||
− | |||
− | |||
− | |||
* {{mIRC|$puttok}} | * {{mIRC|$puttok}} | ||
− | |||
* {{mIRC|$remtok}} | * {{mIRC|$remtok}} | ||
* {{mIRC|$reptok}} | * {{mIRC|$reptok}} | ||
* {{mIRC|$sorttok}} | * {{mIRC|$sorttok}} | ||
+ | * {{mIRC|$wildtok}} | ||
* [[List of identifiers - mIRC]] | * [[List of identifiers - mIRC]] | ||
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
+ | [[Category:mIRC identifiers|numtok]] |
Latest revision as of 07:10, 21 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$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]
- $addtok
- $deltok
- $gettok
- $findtok
- $instok
- $istok
- $matchtok
- $puttok
- $remtok
- $reptok
- $sorttok
- $wildtok
- List of identifiers - mIRC
mIRC identifier list