Logo

Programming-Idioms

History of Idiom 110 > diff from v91 to v92

Edit summary for version 92 by Joe:
New Ruby implementation by user [Joe]

Version 91

2022-05-25, 19:29:00

Version 92

2022-05-25, 19:29:55

Idiom #110 Check if string is blank

Set the boolean blank to true if the string s is empty, or null, or contains only whitespace ; false otherwise.

Idiom #110 Check if string is blank

Set the boolean blank to true if the string s is empty, or null, or contains only whitespace ; false otherwise.

Code
blank = s.nil? || s.empty?