Empty string: Difference between revisions

Content added Content deleted
m (added comment how to check empty string explicitly)
m (→‎{{header|Ruby}}: Show that s.clear mutates the string.)
Line 582: Line 582:
<lang ruby>s = ""
<lang ruby>s = ""
s = String.new
s = String.new
s = "any string".clear</lang>
s = "any string"; s.clear</lang>


These expressions all evaluate to true to determine emptiness:
These expressions all evaluate to true to determine emptiness: