Logo

Programming-Idioms

History of Idiom 110 > diff from v18 to v19

Edit summary for version 19 by :
New Ruby implementation by user [steenslag]

Version 18

2016-02-23, 21:00:41

Version 19

2016-04-06, 19:16:31

Idiom #110 Check if string is blank

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

Idiom #110 Check if string is blank

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

Code
blank = s.strip.empty?