Empty string: Difference between revisions

Line 137:
Strings are represented as an addr-len pair on the stack. An empty string has len 0.
 
<lang forth>: empty? ( strc-addr lenu -- ? ) nip 0= ;
 
s" " dup . empty? . \ 0 -1</forthlang>
 
=={{header|Go}}==
Anonymous user