Empty string: Difference between revisions
Content deleted Content added
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) removed langur language example for now |
||
Line 1,891: | Line 1,891: | ||
fn.println(parser.op(@$s > 0)) |
fn.println(parser.op(@$s > 0)) |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|langur}}== |
|||
You can use empty quote marks or you can use the zls token. |
|||
<syntaxhighlight lang="langur">val .zls = "" |
|||
writeln .zls == "" |
|||
writeln .zls != "" |
|||
writeln len(.zls)</syntaxhighlight> |
|||
<syntaxhighlight lang="langur">val .zls = zls |
|||
writeln .zls == zls |
|||
writeln .zls != zls</syntaxhighlight> |
|||
{{out}} |
|||
<pre>true |
|||
false |
|||
0</pre> |
|||
Also, zero-length strings are non-truthy and other strings are truthy (when used within a Boolean expression / test). |
|||
=={{header|Lasso}}== |
=={{header|Lasso}}== |