mIRC Home    About    Download    Register    News    Help

Print Thread
#85184 03/06/04 09:25 PM
Joined: Aug 2003
Posts: 44
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2003
Posts: 44
$strip doesn't work quite well with commas.
Like every other identifier it thinks the comma seperates the parameters.
So this turns out to be $null:
Code:
 echo -a $strip(12,2bug!) 

And this cuts the end of the text (obviously)
Code:
echo -a $strip(hehe. look at this weird 12,2bug!)

As a "workaround" this worked for me:
Code:
echo -a $strip($replace(12,2bug!$chr(44),$chr(3)))  

(the stripped line will lack commas wink)

P.S.: I know $regex would do better as a workaround but I'm too lazy atm.
P.P.S.: Yes, it IS tested on mIRC 6.15

#85185 03/06/04 09:38 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Comma is a mirc identifier delimiter, try these....
Code:
//var %a = hehe. look at this weird 12,2bug! | echo -a $strip(%a)
Code:
//tokenize 32 hehe. look at this weird 12,2bug! | echo -a $strip($1-)

#85186 04/06/04 08:40 AM
Joined: Aug 2003
Posts: 44
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2003
Posts: 44
Quote:
Comma is a mirc identifier delimiter

I do know that.
I would prefer $strip working otherwise though.

Last edited by ChosenOne; 04/06/04 08:41 AM.
#85187 04/06/04 09:03 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
But $strip can have two parameters...

And even if it didn't, it doesn't make sense to break future extensibility just so you don't have to assign a variable or use $chr(44).


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#85188 04/06/04 11:21 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Why? It's the nature of the beast. You shouldn't be typing //echo -a $strip(1~~16,14 (,,°°>), it's used on strings in events, aliases and such where the string is already part of an $* or %* laugh


Link Copied to Clipboard