Logo

Programming-Idioms

History of Idiom 110 > diff from v82 to v83

Edit summary for version 83 by programming-idioms.org:
[Dart] +DemoURL

Version 82

2022-02-24, 18:08:13

Version 83

2022-03-03, 22:39:47

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
final blank = s == null || s.trim() == '';
Code
final blank = s == null || s.trim() == '';
Demo URL
https://dartpad.dev/?id=d58a5589a5b7fab884e22068b60b24c2