Substring/Top and tail: Difference between revisions
Content added Content deleted
Jazzedpineda (talk | contribs) (Add Microsoft Small Basic, EasyLang, Golfscript) |
(add sed) |
||
Line 2,168: | Line 2,168: | ||
(define (string-top-tail s) |
(define (string-top-tail s) |
||
(string-tail (string-top s)))</syntaxhighlight> |
(string-tail (string-top s)))</syntaxhighlight> |
||
=={{header|sed}}== |
|||
Remove the first character: |
|||
<syntaxhighlight lang="sed">s/.//</syntaxhighlight> |
|||
Remove the last character: |
|||
<syntaxhighlight lang="sed">s/.$//</syntaxhighlight> |
|||
Remove the first and the last character in one step: |
|||
<syntaxhighlight lang="sed">s/.\(\(.*\).\)\{0,1\}/\2/</syntaxhighlight> |
|||
=={{header|Seed7}}== |
=={{header|Seed7}}== |