mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2003
Posts: 40
H
HadS Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jul 2003
Posts: 40
This would be good to add the pos property to $gettok(), $findtok(), $matchtok(), $istok() and $wildtok().

eg: $gettok(Just.a.test,2,46).pos should return 6.
$matchtok(one two three, e, 2, 32).pos should return 9.

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Should $gettok(Just...a...test,2,46).pos return 6 or 8? It can give some strange things when you get the position in a string and after an $addtok it's different.

Maybe tokens and positions in strings are different things and shouldn't be mixed?

Joined: Jul 2003
Posts: 40
H
HadS Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jul 2003
Posts: 40
$gettok(Just...a...test,2,46).pos should return 8 because $gettok(Just...a...test,2,46) return a.

Joined: Nov 2003
Posts: 27
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Nov 2003
Posts: 27
it should return 6. Since even empty tokens are tokens.
$gettok(Just...a...test,2,46) SHOULD return $null
This is btw, what screwed up some scripts. smirk

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Then you don't know much about tokens, and the way mIRC handles them.

mIRC strips out consecutive token delimiters.

/tokenize 46 this......is.....a test

$0 = 3
$1 = this
$2 = is
$3 = a test

Greets


Gone.

Link Copied to Clipboard