Project

General

Profile

Token Manipulation » History » Version 3

Mr. BS, 02/18/2017 01:46 AM

1 1 Mr. BS
h1. Token Manipulation
2
3
{{>toc}}
4
5
h4. <notextile></notextile>
6
7 2 Mr. BS
*Token* in [[Scripting|AdiIRC scripting]] are lists of strings that is separated by a single unique character.
8 1 Mr. BS
9
*Example*
10
11
The numerical representation of space char in "ASCII":http://www.asciitable.com/ table is *32*, and *44* is for comma.
12
13
<pre>
14
//set -e %q = which came first, the chicken or the egg?
15
16
; Will print 2, because it has a single comma "splitting" the text in two parts.
17
//echo -ag $numtok(%q, 44)
18
19
; Will print 8, because in this case are 8 strings separated by space char.
20
//echo -ag $numtok(%q, 32)
21
</pre>
22
23
To help you to manipulate list of tokens, there is an extensive set of identifiers and commands.
24
25
&nbsp;
26
27
h2(box). $addtok
28
29
{{include($addtok)}}
30
31
h2(box). $addtokcs
32
33
{{include($addtokcs)}}
34
35
h2(box). $deltok
36
37
{{include($deltok)}}
38
39 3 Mr. BS
h2(box). $findtok
40 1 Mr. BS
41
{{include($findtok)}}
42
43
h2(box). $findtokcs
44
45
{{include($findtokcs)}}
46
47
h2(box). $gettok
48
49
{{include($gettok)}}
50
51
h2(box). $instok
52
53
{{include($instok)}}
54
55
h2(box). $istok
56
57
{{include($istok)}}
58
59
h2(box). $istokcs
60
61
{{include($istokcs)}}
62
63
h2(box). $matchtok
64
65
{{include($matchtok)}}
66
67
h2(box). $matchtokcs
68
69
{{include($matchtokcs)}}
70
71
h2(box). $numtok
72
73
{{include($numtok)}}
74
75
h2(box). $puttok
76
77
{{include($puttok)}}
78
79
h2(box). $remtok
80
81
{{include($remtok)}}
82
83
h2(box). $remtokcs
84
85
{{include($remtokcs)}}
86
87
h2(box). $reptok
88
89
{{include($reptok)}}
90
91
h2(box). $reptokcs
92
93
{{include($reptokcs)}}
94
95
h2(box). $sorttok
96
97
{{include($sorttok)}}
98
99
h2(box). $sorttokcs
100
101
{{include($sorttokcs)}}
102
103
h2(box). $wildtok
104
105
{{include($wildtok)}}
106
107
h2(box). $wildtokcs
108
109
{{include($wildtokcs)}}
110
111
h2(box). Tokenize
112
113
{{include(Tokenize)}}
114
115
h2(box). $*
116
117
{{include($*)}}