Skip to content

read_line squashes multiple carriage returns into one #276

Closed
agarwal opened this Issue Jul 18, 2012 · 0 comments

2 participants

@agarwal
ocaml-batteries-team member
agarwal commented Jul 18, 2012

If multiple carriage returns occur within a line, they are lost by read_line. Here's a test showing the error:

# let i  = BatIO.input_string "kldsjf\r\r\rasdfa\nsfdsagf\n";;
val i : BatIO.input = <abstr>
# BatIO.read_line i;;
- : string = "kldsjf\rasdfa"

I marked this as an easy fix, but performance is important for a low-level function like this. Making sure that a fix is efficient may require more work.

@thelema thelema closed this in 2dd404e Jul 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.