From WikiChip
Difference between revisions of "mirc/identifiers/$sorttok"
m |
Maroonbells (talk | contribs) m |
||
Line 1: | Line 1: | ||
{{mirc title|$sorttok identifier}}'''$sorttok''' sorts the token in text. | {{mirc title|$sorttok identifier}}'''$sorttok''' sorts the token in text. | ||
− | |||
== Synopsis == | == Synopsis == | ||
− | <pre>$ | + | <pre>$sorttok(<list>,C[,nrca])</pre> |
− | == | + | == Parameters == |
* '''<list>''' - The list of tokens (can be empty) | * '''<list>''' - The list of tokens (can be empty) | ||
* '''<C>''' - The ascii number (or code point) of the character seperating the tokens | * '''<C>''' - The ascii number (or code point) of the character seperating the tokens | ||
− | * '''ncra''' - default is alphabetical sort, n = numeric sort; c = channel prefix sort; r = reverse; a = | + | * '''ncra''' - default is alphabetical sort (ASCII order) if 3rd parameter not used, n = numeric sort; c = channel prefix sort; r = reverse; a = ASCII sort |
+ | |||
+ | Note: 'a' sort is case-insensitive. For case-insensitive use $sorttokcs | ||
== Properties == | == Properties == | ||
Line 15: | Line 16: | ||
== Example == | == Example == | ||
− | <source lang="mIRC">//echo -a $sorttok(C a c b A B,32,a)</source> | + | <source lang="mIRC">//echo -a $sorttok(C a c b A B,32,a) |
+ | |||
+ | //echo -a Sorted in ASCII order: $sorttok( $chr(10004) $chr(9650) $chr(9660) , 32) | ||
+ | </source> | ||
+ | |||
+ | <source lang="mIRC"> | ||
+ | alias NumericMax { | ||
+ | return $gettok($sorttok($1- , 32 , rn),1,32) | ||
+ | } | ||
+ | </source> | ||
== Compatibility == | == Compatibility == |
Revision as of 19:57, 8 January 2018
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$sorttok sorts the token in text.
Synopsis
$sorttok(<list>,C[,nrca])
Parameters
- <list> - The list of tokens (can be empty)
- <C> - The ascii number (or code point) of the character seperating the tokens
- ncra - default is alphabetical sort (ASCII order) if 3rd parameter not used, n = numeric sort; c = channel prefix sort; r = reverse; a = ASCII sort
Note: 'a' sort is case-insensitive. For case-insensitive use $sorttokcs
Properties
None
Example
//echo -a $sorttok(C a c b A B,32,a) //echo -a Sorted in ASCII order: $sorttok( $chr(10004) $chr(9650) $chr(9660) , 32)
alias NumericMax { return $gettok($sorttok($1- , 32 , rn),1,32) }
Compatibility
Added: mIRC v4.7
Added on: 09 Dec 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
- $addtok
- $deltok
- $findtok
- $gettok
- $instok
- $istok
- $matchtok
- $numtok
- $puttok
- $remtok
- $reptok
- $sorttokcs
- $wildtok
mIRC identifier list