From: gf <8si.greg@...>
Date: 2009-11-03T02:29:27+09:00
Subject: Re: How do you get the tail end of a string?
On Oct 30, 4:11 am, Bertram Scharpf
wrote:
[...]
> By the way: Still I'm convinced that there should be a
> `String#notempty?' method corresponding to `Numeric#nonzero?'.
>
> Bertram
>
> --
> Bertram Scharpf
> Stuttgart, Deutschland/Germanyhttp://www.bertram-scharpf.de
Maybe I'm totally missing the point here, but I thought String.any?
was good enough to tell whether a string has contents:
'asdf'.any? # => true
''.any? # => false
'asdf'.empty? # => false
''.empty? # => true