portable-lines: Alternative 'lines' implementation that understands CR-LF and CR
Provides an alternative implementation of the Prelude.lines
function that
treats the following sequences as newline characters:
"\r\n"
(Windows style)"\r"
(Macintosh style, before OS X)"\n"
(Unix style)
Haskell's IO system supports both platform-specific line ending conversion
(by opening the file in "text mode"), and explicit setting of the newline
mode for input and output (see System.IO.hSetNewlineMode
). However:
If you don't know the line ending format in advance, you would have to open the file and detect the newline format manually.
ByteString currently honors neither of these; see http://stackoverflow.com/questions/6837628.
Downloads
- portable-lines-0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1 |
---|---|
Dependencies | base (>=4 && <5), bytestring [details] |
License | BSD-3-Clause |
Copyright | Copyright (c) Joseph Adams 2011 |
Author | Joey Adams |
Maintainer | joeyadams3.14159@gmail.com |
Category | Text |
Source repo | head: git clone git://github.com/joeyadams/haskell-portable-lines.git |
Uploaded | by JoeyAdams at 2011-11-14T06:53:12Z |
Distributions | LTSHaskell:0.1, NixOS:0.1, Stackage:0.1 |
Reverse Dependencies | 3 direct, 4 indirect [details] |
Downloads | 1524 total (13 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |