Extra string functions for OCaml