Empty string: Difference between revisions

Content added Content deleted
(add Mercury)
Line 1,501: Line 1,501:
slength(s) = "";
slength(s) = "";
slength(s) # "";</lang>
slength(s) # "";</lang>

=={{header|Mercury}}==

There's nothing special about empty strings in Mercury.

<lang Mercury>S = "", % assignment

( if S = "" then ... else ... ), % checking if a string is empty

( if not S = "" then ... else ... ), % checking if a string is not empty</lang>


=={{header|min}}==
=={{header|min}}==