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

→‎{{header|Perl 6}}: Added Perl 6 solution
(added haskell)
(→‎{{header|Perl 6}}: Added Perl 6 solution)
Line 90:
Sh ws soul strppr. Sh took my hrt!
</pre>
 
=={{header|Perl 6}}==
<lang perl6>sub strip_chars ( $s, $chars ) {
return $s.trans( $chars.comb X=> '' );
}
 
say strip_chars( 'She was a soul stripper. She took my heart!', 'aei' );</lang>
 
Output:<pre>Sh ws soul strppr. Sh took my hrt!</pre>
 
=={{header|PHP}}==
256

edits