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

(added python)
Line 20:
let rec aux i j =
if i >= len then String.sub res 0 j
else matchif String.contains cs s.[i] withthen
| true ->aux (succ i) (j)
else begin
aux (succ i) (j)
| false res.[j] <-> s.[i];
aux (succ res.[j]i) <-(succ s.[i];j)
end
aux (succ i) (succ j)
in
aux 0 0</lang>
Anonymous user