Empty string: Difference between revisions

Content added Content deleted
(Added zkl)
(Add Dart)
Line 312: Line 312:
}</lang>
}</lang>


=={{header|Dart}}==

<lang dart>main() {
var empty = '';

if (empty.isEmpty) {
print('it is empty');
}

if (empty.isNotEmpty) {
print('it is not empty');
}
}</lang>
=={{header|Déjà Vu}}==
=={{header|Déjà Vu}}==
Like in Python, empty strings are falsy, non-empty strings are truthy.
Like in Python, empty strings are falsy, non-empty strings are truthy.