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 03:37, 8 June 2011
, 13 years ago→{{header|Perl}}
Line 67:
=={{header|Perl}}==
Caveat: in this version hyphens in the second argument can be used to specify ranges; if you need to actually strip hyphens, you need to put a backslash before it
<lang perl>sub stripchars {
my ($s, $chars) = @_;
|