Strip a set of characters from a string: Difference between revisions
Strip a set of characters from a string (view source)
Revision as of 08:30, 15 January 2022
, 2 years agoFroml
(add BQN) |
(Froml) |
||
Line 1,334:
Sh ws soul strppr. Sh took my hrt!
</pre>
=={{header|Frink}}==
<lang frink>stripchars[str, remove] :=
{
set = toSet[chars[remove]]
return char[select[char[str], {|c, set| ! set.contains[c]}, set]]
}
println[stripchars["She was a soul stripper. She took my heart!","aei"]]
</lang>
{{out}}
<pre>
Sh ws soul strppr. Sh took my hrt!
</pre>
=={{header|Fōrmulæ}}==
|