Determine if a string is collapsible: Difference between revisions
Determine if a string is collapsible (view source)
Revision as of 20:18, 16 December 2019
, 4 years ago→{{header|Ruby}}: Added small intro.
(→{{header|Ruby}}: Added Ruby) |
(→{{header|Ruby}}: Added small intro.) |
||
Line 835:
=={{header|Ruby}}==
This is built in since at least a decade under the method name 'squeeze'. squeeze(" ") would only squeeze spaces.
<lang ruby>strings = ["",
'"If I were two-faced, would I be wearing this one?" --- Abraham Lincoln ',
|