Anonymous user
Empty string: Difference between revisions
m
→{{header|Ruby}}: Show that s.clear mutates the string.
m (added comment how to check empty string explicitly) |
m (→{{header|Ruby}}: Show that s.clear mutates the string.) |
||
Line 582:
<lang ruby>s = ""
s = String.new
s = "any string"; s.clear</lang>
These expressions all evaluate to true to determine emptiness:
|