Substring/Top and tail: Difference between revisions
Content added Content deleted
m (added whitespace.) |
(Added Quackery.) |
||
Line 1,524: | Line 1,524: | ||
['ocks', 'sock', 'ock'] |
['ocks', 'sock', 'ock'] |
||
['rooms', 'broom', 'room']</pre> |
['rooms', 'broom', 'room']</pre> |
||
=={{header|Quackery}}== |
|||
As a dialogue in the Quackery shell. |
|||
<pre>/O> $ "callipygian" |
|||
... say "original string: " |
|||
... dup echo$ cr |
|||
... say "without head: " |
|||
... dup behead drop echo$ cr |
|||
... say "without tail: " |
|||
... -1 split drop dup echo$ cr |
|||
... say "topped and tailed: " |
|||
... behead drop echo$ cr |
|||
... |
|||
original string: callipygian |
|||
without head: allipygian |
|||
without tail: callipygia |
|||
topped and tailed: allipygia |
|||
</pre> |
|||
=={{header|Racket}}== |
=={{header|Racket}}== |