Anonymous user
Substring/Top and tail: Difference between revisions
→{{header|C sharp}}: Added Common Lisp
(→{{header|Julia}}: solve the stated problem) |
(→{{header|C sharp}}: Added Common Lisp) |
||
Line 241:
tes
es</pre>
=={{header|Common Lisp}}==
<code>subseq</code> will crash if you provide invalid start or end values.
<lang lisp>> (defvar *str* "∀Ꮺ✤Л◒")
*STR*
> (subseq *str* 1) ; remove first character
"Ꮺ✤Л◒"
> (subseq *str* 0 (1- (length *str*))) ; remove last character
"∀Ꮺ✤Л"
> (subseq *str* 1 (1- (length *str*))) ; remove first and last character
"Ꮺ✤Л"</lang>
=={{header|D}}==
|