RosettaCodeData/Task/Empty-string/Ruby/empty-string-2.rb

9 lines
102 B
Ruby
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
s == ""
s.eql?("")
s.empty?
s.length == 0
s[/\A\z/]
# also silly things like
s.each_char.to_a.empty?