Jump to content

Empty string: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 561:
if (nchar(s) > 0) cat('Not empty\n')</lang>
 
=={{header|Rascal}}==
<lang rascal>str s = "";
if (s=="") print("string s is empty");
if (s!="") print("string s is not empty");
</lang>
Or the build-in operator:
<lang rascal>import String;
isEmpty(s);</lang>
=={{header|Retro}}==
Create an empty string and assign it to a variable. In these '''keepString''' is used to ensure that the string is permanent.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.