Strip a set of characters from a string: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add ABC) |
|||
Line 1,465: | Line 1,465: | ||
=={{header|F_Sharp|F#}}== |
=={{header|F_Sharp|F#}}== |
||
<syntaxhighlight lang="fsharp"> |
<syntaxhighlight lang="fsharp"> |
||
let stripChars text (chars:string) = |
|||
Seq.fold ( |
|||
fun (s:string) c -> s.Replace(c.ToString(),"") |
fun (s:string) c -> s.Replace(c.ToString(),"") |
||
) text |
) text chars |
||
⚫ | |||
⚫ | |||
[<EntryPoint>] |
|||
{{out}} |
|||
let main args = |
|||
<pre> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
</pre> |
|||
Output |
|||
⚫ | |||
=={{header|Factor}}== |
=={{header|Factor}}== |