Jump to content

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

Add Uiua
(PascalABC.NET)
(Add Uiua)
Line 2,931:
<code>(do if (memq @1 set) (list @1))</code> is just <code>(lambda (item) (if (memq item set) (list item)))</code>.
<code>mappend</code> happily maps over strings and since the leftmost input sequence is a string, and the return values of the lambda are sequence of characters, <code>mappend</code> produces a string.
 
=={{header|Uiua}}==
{{works with|Uiua|0.11.1}}
<syntaxhighlight lang="uiua">
Strip ← ▽¬∊,
 
Strip "aei" "She was a soul stripper. She took my heart!"
</syntaxhighlight>
{{out}}
<pre>
"Sh ws soul strppr. Sh took my hrt!"
</pre>
 
=={{header|UNIX Shell}}==
1,827

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.