RosettaCodeData/Task/Empty-string/Ruby/empty-string-2.rb
2023-07-01 13:44:08 -04:00

8 lines
102 B
Ruby

s == ""
s.eql?("")
s.empty?
s.length == 0
s[/\A\z/]
# also silly things like
s.each_char.to_a.empty?