Empty string: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
(Adds slope example)
Line 2,913: Line 2,913:
s ~~ /./s;
s ~~ /./s;
s !~ /^\z/;</syntaxhighlight>
s !~ /^\z/;</syntaxhighlight>

=={{header|Slope}}==
<syntaxhighlight lang="slope">
(define test-string-1 "")
(define test-string-2 "Not empty")

(define empty-string? (lambda (x)
(and (string? x) (zero? (length x)))))

(empty-string? test-string-1) ; #t
(empty-string? test-string-2) ; #f
</syntaxhighlight>


=={{header|Smalltalk}}==
=={{header|Smalltalk}}==