How is this better than doing "not str.empty?".

Also, the method should really return false instead of nil.

 - Evan

On 3/12/06, Bertram Scharpf <lists / bertram-scharpf.de> wrote:
> Hi,
>
> I oftenly use `Numeric#nonzero?'. Actually, I miss its
> equivalent, a method maybe `String#notempty?', returning
> the string if it has a length and nil otherwise.
>
> It wasn't difficult to write and it's not using much space:
>
>   http://www.bertram-scharpf.de/tmp/notempty.patch
>
> Do you think it is worth being included?
>
> Bertram
>
>
> --
> Bertram Scharpf
> Stuttgart, Deutschland/Germany
> http://www.bertram-scharpf.de
>
>


--
When I do good, I feel good;  when I do bad, I feel bad,
and that is my religion.
    -- Abraham Lincoln (1809 - 1865)