Logo

Programming-Idioms

History of Idiom 110 > diff from v47 to v48

Edit summary for version 48 by areille:
New Dart implementation by user [areille]

Version 47

2019-10-01, 20:27:44

Version 48

2020-02-09, 16:35:29

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
final blank = s == null || s.trim() == '';