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 22:26, 7 June 2011
, 13 years ago→{{header|Perl}}
(added ruby) |
|||
Line 69:
<lang perl>sub stripchars {
my ($s, $chars) = @_;
eval("\$s =~ tr/$chars//d;");
return $s;
}
|