Empty string: Difference between revisions

no edit summary
(added a solution for Factor)
No edit summary
Line 1,395:
if (isEmpty(s)) print("string s is empty");
if (isEmpty(s)) print("string s is not empty");</lang>
=={{header|Red}}==
 
<lang Red>Red []
s: copy "" ;; assign empty string
?? s
if empty? s [print "string is empty "] ;; check if string is empty
s: "abc"
prin s unless empty? s [print " not empty"]
</lang>
{{out}}
<pre>s: ""
string is empty
abc not empty
>>
</pre>
=={{header|Retro}}==
Create an empty string and assign it to a variable. In these '''keepString''' is used to ensure that the string is permanent.
 
<lang Retro>
( by creating a variable )