|
Per sapere il numero di un carattere asci,
usare $asc(carattere)
Es. $asc(.) Restituisce il numero 46
P.S. In mIRC esiste un bug, cioè se si prova a fare
//echo -a $asc(,), esso dara come risultato
$null,quindi non possiamo sapere qual'è il valore
ascii della virgola.In ogni caso comunque, il valore
ascii della virgola è: 44
$addtok(text,token,C)
Aggiunge un token alla fine della parola (text) ma solo
se token non è già presente in text
Il parametro C è un parametro numerico, che indica
il carattere ascii su cui lavorare. Vale per tutti gli identificatori
di token
$addtok(a.b.c,d,46) Restituisce a.b.c.d
$addtok(a.b.c.d,c,46) Restituisce a.b.c.d, e non a.b.c.d.c,
perchè il carattere c già esiste nel text
$addtokcs si usa allo stesso modo di $addtok, solo che
usa il case-sensitive, e cioè riconosce le maiuscole
dalle minuscole
$deltok(text,N-N2,C)
Cancella l'ennesimo token dal text
$deltok(a.b.c.d,3,46) Restituisce come valore a.b.d
$deltok(a.b.c.d,2-3,46) Restituisce come valore a.d
$deltok(a.b.c.d,2-,46) Restituisce come valore a
Si può anche specificare un numero negativo da sostituire
ad N per partire dall'ultimo token
$findtok(text,token,N,C)
Restituisce la posizione dell'ennesimo token cercato in
text
$findtok(a.b.c.d,c,1,46) Restituisce come valore 3
$findtok(a.b.c.d,e,1,46) Restituisce $null
$findtok(a.b.c.d.e.f.c,c,0,46) Restituisce come valore 2
Se al posto di N inseriamo 0, il valore che ci sarà
restituito sarà uguale al numero totale di tokens
specificati
$findtokcs si usa allo stesso modo di $findtok, solo che
usa il case-sensitive, e cioe riconosce le maiuscole dalle
minuscole
$gettok(text,N,C)
Restituisce l'ennesimo token in text
Se N è uguale a 0, restituirà come valore
il numero totale di token in text per il valore ascii di
C
$gettok(a.b.c.d.e,3,46) Restituisce come valore c
$gettok(a.b.c.d.e,9,46) Restituisce come valore $null
Possiamo anche specificare un range di token
$gettok(a.b.c.d.e,2-,46) Restituisce come valore b.c.d.e
$gettok(a.b.c.d.e,2-4,46) Restituisce come valore b.c.d
Si può anche specificare un numero negativo da sostituire
ad N partire dall'ultimo token
$instok(text,token,N,C)
Inserisce un token nella posizione N nel testo text anche
se già esiste il token in text
$instok(a.b.d,c,3,46) Restituisce il valore a.b.c.d
$instok(a.b.d,c,9,46) Restituisce il valore a.b.c.d
Si può anche specificare un numero negativo da sostituire
ad N partire dall'ultimo token
$istok(text,token,C)
Restituisce $true se il token nel testo text esiste, altrimenti
restituisce $false
$istok(a.b.c.d,c,46) Restituisce come valore $true
$istok(a.b.c.d,e,46) Restituisce come valore $false
$matchtok(text,string,N,C)
Restituisce i token che contentono la parola specificata
in string
Se si specifica 0 come valore di N, restituisce il numero
di token totali presenti in text contenenti la parola string
seguendo il carattere ascii C
$matchtok(one two three,e,0,32) Restituisce come valore
il totale dei token contenenti la parola string nel testo
text seguendo il valore ascii C (32, lo spazio)
$matchtok(one two three,e,1,32) Restituisce come valore
one, perchè è il primo token contenente la
parola string nel testo text seguendo il valore ascii C
(32)
$matchtok(one two three,e,2,32) Restituisce come valore
three, perchè è il secondo token contenente
la parola string nel testo text seguendo il valore ascii
C (32)
$matchtokcs si usa allo stesso modo di $matchtok, solo
che usa il case-sensitive, e cioe riconosce le maiuscole
dalle minuscole
$numtok(text,C)
Restituisce il numero di tokens presenti in text
$numtok(a.b.c.d,46) Restituisce il valore 4
$puttok(text,token,N,C)
Sovrascrive l'ennesima linea di token presente in text con
il nuovo token
$puttok(a.b.c.d,e,2,46) Restituisce il valore a.e.c.d
Si può anche specificare un numero negativo da sostituire
ad N partire dall'ultimo token
$remtok(text,token,N,C)
Rimuove l'ennesimo token cercato in text
$remtok(a.b.c.d,b,1,46) Restituisce come valore a.c.d
$remtok(a.b.c.d.b.e,2,46) Restituisce come valore a.b.c.d.e
$remtokcs si usa allo stesso modo di $remtok, solo che
usa il case-sensitive, e cioe riconosce le maiuscole dalle
minuscole
$reptok(text,token,new,N,C)
Rimpiazza l'ennesima linea nel text con un nuovo token
$reptok(a.b.c.d,b,e,1,46) Restituisce come valore a.e.c.d
$reptok(a.b.c.d,f,e,1,46) Restituisce come valore a.b.c.d
perchè il token f non esiste in text
$reptok(a.b.c.d.b.f,b,e,2,46) Restituisce come valore a.b.c.d.e.f
$reptokcs si usa allo stesso modo di $reptok, solo che
usa il case-sensitive, e cioe riconosce le maiuscole dalle
minuscole
$sorttok(text,C,ncr)
Ordina i token nel testo text a seconda della flag specificata
(ncr)
Se le flag non sono specificare, l'ordinazione di default
è in ordine alfabetico, altimenti usare le flag che
servono
n = numeric sort, c = channel nick prefix sort, r = reverse
sort
$sorttok(e.d.c.b.a,46) Restituisce come valore a.b.c.d.e
$sorttok(1.3.5.2.4,46,nr) Restituisce come valore 1.2.3.4.5
perchè è specificata la flag n (numeric sort)
che li ordina in modo decrescente, e r (reverse sort) per
invertire l'ordine, e per far apparire l'ordine crescente
$sorttokcs si usa allo stesso modo di $sorttok, solo che
usa il case-sensitive, e cioe riconosce le maiuscole dalle
minuscole
$wildtok(tokens,wildstring,N,C)
Restituisce l'ennesimo token specificato nella wilstring
seguendo il valore ascii di C e trovando il N token in text
Se N è uguale a 0, verrà restituito come valore
il numero totale di token presenti in text aventi la wildstring
seguendo il carattere ascii numero C
$wildtok(one two three,t*,0,32) Restituisce il valore 2
$wildtok(one two three,t*,2,32) Restituisce il valore three,
perchè la wildstring t* si trova nel secondo tokens
nella scritta text seguendo il carattere ascii numero 32
(lo spazio)
$wildtok(one two three,t*,1,32) Restituisce il valore two,
perchè la wildstring t* si trovan nel primo tokens
nella scritta text seguendo il carattere ascii numero 32
$wildtok(one two three,t*,3,32) Restituisce $null, perchè
non esiste il 3° tokens nel testo text seguendo il carattere
ascii 32 avente la wildstring t* al suo interno
$wildtokcs si usa allo stesso modo di $wildtok, solo che
usa il case-sensitive, e cioe riconosce le maiuscole dalle
minuscole.
Simone
|