Anonymous user
Empty string: Difference between revisions
Forth
(Forth) |
|||
Line 120:
-- string is not empty
end if</lang>
=={{header|Forth}}==
Strings are represented as an addr-len pair on the stack. An empty string has len 0.
<lang forth>: empty? ( str len -- ? ) nip 0= ;
s" " dup . empty? . \ 0 -1</forth>
=={{header|Go}}==
|