Logo

Programming-Idioms

History of Idiom 110 > diff from v90 to v91

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

Version 90

2022-05-23, 18:54:25

Version 91

2022-05-25, 19:29:00

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.blank?