Strip a set of characters from a string: Difference between revisions
Content deleted Content added
Not a robot (talk | contribs) Add SETL |
Not a robot (talk | contribs) Add Refal |
||
Line 2,409: | Line 2,409: | ||
stripchars: func [str chars] [trim/with str chars] |
stripchars: func [str chars] [trim/with str chars] |
||
stripchars "She was a soul stripper. She took my heart!" "aei"</syntaxhighlight> |
stripchars "She was a soul stripper. She took my heart!" "aei"</syntaxhighlight> |
||
=={{header|Refal}}== |
|||
<syntaxhighlight lang="refal">$ENTRY Go { |
|||
= <Prout <Strip ('aei') 'She was a soul stripper. She took my heart!'>>; |
|||
}; |
|||
Strip { |
|||
(e.Chs) = ; |
|||
(e.Chs) s.C e.S, e.Chs: e.1 s.C e.2 = <Strip (e.Chs) e.S>; |
|||
(e.Chs) s.C e.S = s.C <Strip (e.Chs) e.S>; |
|||
};</syntaxhighlight> |
|||
{{out}} |
|||
<pre>Sh ws soul strppr. Sh took my hrt!</pre> |
|||
=={{header|REXX}}== |
=={{header|REXX}}== |