Strip a set of characters from a string: Difference between revisions
Strip a set of characters from a string (view source)
Revision as of 13:09, 2 April 2024
, 3 months agoAdd ABC
Not a robot (talk | contribs) (Add Refal) |
Not a robot (talk | contribs) (Add ABC) |
||
Line 205:
{{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>
|