shithub: martian9

ref: bfe18062adfcad6af73f1b5ab204763df12649a6
dir: /utils.ml/

View raw version
(* copied verbatim - must needs grok *)
let gsub re f str =
  String.concat
    ""
    (List.map
       (function
         | Str.Delim x -> f x
         | Str.Text x -> x)
       (Str.full_split re str))
;;