Anonymous user
Strip a set of characters from a string: Difference between revisions
Strip a set of characters from a string (view source)
Revision as of 16:09, 18 June 2011
, 13 years ago+Common Lisp
(GP) |
(+Common Lisp) |
||
Line 31:
Sh ws soul strppr. Sh took my hrt!
</pre>
=={{header|Common Lisp}}==
<lang lisp>(defun strip-chars (str chars)
(remove-if (lambda (ch) (find ch chars)) str))
(strip-chars "She was a soul stripper. She took my heart!" "aei")
;; => "Sh ws soul strppr. Sh took my hrt!"
</lang>
=={{header|D}}==
|