>>I'll second that motion. We already have lots of ways of removing the
>>last character of a string if that's what we really need.
>But they're slow and hard to read.
I would actualy like to see chop expanded to allow a variable number of
characters to be removed and a sister function to cut the head off. Yes I
know you can do this with substr but sometimes when you want the performance
and need to cut up a string into fields. Lets say the new function is called
'take'.
while($str =<F>)
{
$head = take($str,40);
$tail = chop($str,40);
$middle = $str;
#assuming $str had 120 characters in it
}
Just a thought....
- Proposal: chop() dropped Nathan Torkington
- Re: Proposal: chop() dropped Jonathan Scott Duff
- Re: Proposal: chop() dropped Tom Christiansen
- Re: Proposal: chop() dropped Al
- Re: Proposal: chop() dropped Tom Christiansen
- Re: Proposal: chop() dropped Nathan Wiger
- Re: Proposal: chop() dropped Tom Christiansen
- Re: Proposal: chop() dropped Nathan Torkington
- Re: Proposal: chop() dropped Bart Lateur
- Re: Proposal: chop() dropped skud
- Re: Proposal: chop() dropped Ed Mills
- Re: Proposal: chop() dropped Nathan Torkington
- Re: Proposal: chop() dropped Tom Christiansen
- Re: Proposal: chop() dropped Peter Scott
