Substring/Top and tail: Difference between revisions
Content added Content deleted
m (separated two notes.) |
|||
Line 1,507: | Line 1,507: | ||
=={{header|ZX Spectrum Basic}}== |
=={{header|ZX Spectrum Basic}}== |
||
<lang zxbasic>10 PRINT FN f$("knight"): REM strip the first letter |
<lang zxbasic>10 PRINT FN f$("knight"): REM strip the first letter. You can also write PRINT "knight"(2 TO) |
||
20 PRINT FN l$("socks"): REM strip the last letter |
20 PRINT FN l$("socks"): REM strip the last letter |
||
30 PRINT FN b$("brooms"): REM strip both the first and last letter |
30 PRINT FN b$("brooms"): REM strip both the first and last letter |