Strip a set of characters from a string: Difference between revisions
Strip a set of characters from a string (view source)
Revision as of 15:43, 2 April 2024
, 1 month ago→{{header|F_Sharp|F#}}
Not a robot (talk | contribs) (Add ABC) |
|||
Line 1,465:
=={{header|F_Sharp|F#}}==
<syntaxhighlight lang="fsharp">
let stripChars text (chars:string) =
fun (s:string) c -> s.Replace(c.ToString(),"")
) text
{{out}}
<pre>
▲ printfn "%s" (stripChars "She was a soul stripper. She took my heart!" "aei")
▲ 0</syntaxhighlight>
</pre>
▲<pre>Sh ws soul strppr. Sh took my hrt!</pre>
=={{header|Factor}}==
|