mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2005
Posts: 1
P
puns Offline OP
Mostly harmless
OP Offline
Mostly harmless
P
Joined: Mar 2005
Posts: 1
hi
say %hello is the string 'hello!', i want to remove the last character i.e. the ! how would i go about doing this.

thanks in advance
puns

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
//echo -a $left(hello!,-1)


Gone.
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
$left(%hello,-1)

Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
is there a better way to script $right($1-,$calc($len($1-) - 3)) ?

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
U mean $mid($1-,4) ?


Gone.
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
$right($1-, -3)


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
indeed $rigth($1-,-3)
I think I get the negative values thing now. Thanks!

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Umm $right($1-,-3) is the same as $mid($1-,4) heh, just a tad shorter grin


Gone.

Link Copied to Clipboard