Empty string: Difference between revisions

Content deleted Content added
Added the Common Lisp version after the CoffeeScript one
Add NetRexx example
Line 443:
<lang Nemerle>a_string == ""; a_string != 0;
a_string.Length == 0; a_string.Length > 0;</lang>
 
=={{header|NetRexx}}==
<lang NetRexx>/* NetRexx */
options replace format comments java crossref symbols binary
 
s1 = '' -- assignment
s2 = "" -- equivalent to s1
parse '.' . s3 . -- parsing a token that doesn't exist results in an empty string
 
strings = [s1, s2, s3, ' ']
 
loop s_ = 0 to strings.length - 1
say (Rexx s_).right(3)':\-'
select
when strings[s_] == '' then say ' "'strings[s_]'" is really empty'
when strings[s_] = '' then say ' "'strings[s_]'" looks empty but may not be'
when strings[s_].length = 0 then say ' "'strings[s_]'" is empty'
when strings[s_].length > 0 then say ' "'strings[s_]'" is not empty'
otherwise nop
end
end s_
 
return
</lang>
'''Output:'''
<pre>
0: "" is really empty
1: "" is really empty
2: "" is really empty
3: " " looks empty but may not be
</pre>
 
=={{header|Objeck}}==