mIRC Home    About    Download    Register    News    Help

Print Thread
P
puns
puns
P
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,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
//echo -a $left(hello!,-1)

Joined: Dec 2002
Posts: 143
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 143
$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,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
U mean $mid($1-,4) ?

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

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,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Umm $right($1-,-3) is the same as $mid($1-,4) heh, just a tad shorter grin


Link Copied to Clipboard