mIRC Homepage
Posted By: puns remove the last character of a string - 06/03/05 12:12 PM
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
//echo -a $left(hello!,-1)
Posted By: gemeau50 Re: remove the last character of a string - 06/03/05 12:39 PM
$left(%hello,-1)
Posted By: LethPhaos Re: remove the last character of a string - 06/03/05 02:47 PM
is there a better way to script $right($1-,$calc($len($1-) - 3)) ?
U mean $mid($1-,4) ?
Posted By: Hammer Re: remove the last character of a string - 06/03/05 03:30 PM
$right($1-, -3)
Posted By: LethPhaos Re: remove the last character of a string - 06/03/05 03:43 PM
indeed $rigth($1-,-3)
I think I get the negative values thing now. Thanks!
Umm $right($1-,-3) is the same as $mid($1-,4) heh, just a tad shorter grin
© mIRC Discussion Forums