Source file strings.ml

1
2
3
4
5
let contains_substring substr str =
  try
    let _ = Str.search_forward (Str.regexp substr) str 0 in
    true
  with Not_found -> false