Empty string: Difference between revisions
no edit summary
(Add SmallBASIC) |
No edit summary |
||
Line 1,240:
print "no empty"
.</syntaxhighlight>
=={{header|ed}}==
ed has no concept of string, only lines. Still, one can empty (or even delete) a line. Checking for emptiness requires conditional matching with <tt>g</tt> and <tt>v</tt>.
<syntaxhighlight lang="sed">
# Empty the string (line)
s/.*//
# Check for emptiness
g/.+/s//Not empty/
v/Not empty/s//Empty</syntaxhighlight>
=={{header|Elena}}==
|