$sorttok » History » Version 2
Per Amundsen, 02/23/2023 07:32 PM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | *$sorttok(text,C,ncra)* |
||
| 4 | |||
| 5 | Sorts the tokens in text. |
||
| 6 | |||
| 7 | _[[$sorttok]] is case-insensitive, see [[$sorttokcs]] for case-sensitive version._ |
||
| 8 | |||
| 9 | *Parameters* |
||
| 10 | |||
| 11 | 2 | Per Amundsen | table(ktable). |
| 12 | |*Parameter*|*Description*| |
||
| 13 | | text | The text to tokenize. | |
||
| 14 | | C | The "ASCII":http://www.asciitable.com/ value to tokenize by. | |
||
| 15 | | ncra | n = numeric sort, c = channel nick prefix sort, r = reverse sort, a = alphanumeric sort. (Default is an alphabetic sort) | |
||
| 16 | 1 | Per Amundsen | |
| 17 | *Example* |
||
| 18 | |||
| 19 | <pre> |
||
| 20 | ; Sort the tokens alphanumeric |
||
| 21 | //echo -ag $sorttok(e.d.c.b.a,46) |
||
| 22 | |||
| 23 | ; Sort the tokens numeric, reversed |
||
| 24 | //echo -ag $sorttok(1.3.5.2.4,46,nr) |
||
| 25 | </pre> |