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

Content added Content deleted
(Add Refal)
(Add ABC)
Line 205: Line 205:
{{out}}
{{out}}


<pre>Sh ws soul strppr. Sh took my hrt!</pre>

=={{header|ABC}}==
<syntaxhighlight lang="abc">HOW TO RETURN s stripchars chs:
PUT "" IN result
FOR c IN s:
IF c not.in chs: PUT result^c IN result
RETURN result

WRITE "She was a soul stripper. She took my heart!" stripchars "aei"/</syntaxhighlight>
{{out}}
<pre>Sh ws soul strppr. Sh took my hrt!</pre>
<pre>Sh ws soul strppr. Sh took my hrt!</pre>