Strip a set of characters from a string: Difference between revisions

+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}}==
Anonymous user