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

9 lines
102 B
Ruby
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
s == ""
s.eql?("")
s.empty?
s.length == 0
s[/\A\z/]
# also silly things like
s.each_char.to_a.empty?