shithub: martian9

ref: b6f4824d97a68ecfa763e1edcbef629ff3ba1cfc
dir: /utils.ml/

View raw version
exception Syntax_error of string
exception Runtime_error of string

(* 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))
;;