Hi --

On Sun, 10 Jul 2005, Daniel Brockman wrote:

>  Black> Maybe a left chop/chomp operation would be a good idea, but I
>  Black> think it should be called lchop, which would be consistent
>  Black> with other string method naming (rather than with array
>  Black> method naming).
>
> I fail to see the point in that.  String#chop is meant to chop off
> end-of-line characters; String#lchop wouldn't be.  So using that name
> would be _inconsistent_ with other string method naming.

String#chop chops off the rightmost character:

   irb(main):001:0> "abc".chop
   => "ab"

You may be thinking of "chomp", which is a specialized "chop"
operating only on newline characters.

So the idea of lchop would be to serve as a left-hand equivalent of
chop.


David

-- 
David A. Black
dblack / wobblini.net