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 20:27, 9 September 2011
, 12 years ago→{{header|Perl}}
Line 489:
</pre>
Another good option for stripping characters is to use the <code>tr///</code> operator. This option is very efficient when the set of characters to strip is fixed at compile time,
<lang perl>$str =~ tr/aei//d;</lang>
|