mike wrote:
On 11/1/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
I noticed, while perusing the chop() manual page, that some people were giving 
examples of Perl's
chop() and chomp() functions.  Comments made about both said the examples were 
good, but not correct.

what about trim(), rtrim() and ltrim() ? seems unnecessary to reinvent
the wheel. if you want an array one, just make it recurse like you
did.

- mike


the functions that you mentioned do not do the same thing as what this function 
does.

it alters a reference to the variable that you passed it and returns what it 
removed.

The above listed functions return the altered string.

Just a little difference. But, if you are comfortable using the Perl's chomp() function, then I think I created the PHP equivalent.

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to