The following code snippet is from ocsigen source. I donot understand “int_of_string” called with two arguments:
try
let dppos = String.index ss':'
and len = String.length ss in
let host = String.sub ss 0 dppos
and port =
match String.sub ss (dppos+1) ((len - dppos) - 1) with
"*" -> None
| p -> Some (int_of_string "host" p)
in host, port
with
| Not_found -> ss, None
| Failure _ ->
raise (Config_file_error "bad port number")
I test it in toplevel, it reports error normally .
Sincerely!
Note at the top of that file:
i.e. it’s not
Pervasives.int_of_stringat all!