This commit is contained in:
Simon Cruanes 2014-06-15 23:10:16 +02:00
parent 74856b578a
commit ebb8310f84

View file

@ -1008,7 +1008,8 @@ module IO = struct
else _find s c (i+1)
let rec _lines s i k = match _find s '\n' i with
| None -> ()
| None ->
if i<String.length s then k (String.sub s i (String.length s-i))
| Some j ->
let s' = String.sub s i (j-i) in
k s';