Copyright | (c) 2019-2020 Vaclav Svejcar |
---|---|
License | BSD-3 |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Adds some extra functionality to the Data.Text module.
Documentation
Detects which newline character is used in given text (if any).
>>>
detectNewLine "foo\nbar"
Just LF
Renders appropriate newline character (e.g. n
) for given NewLine
representation.
>>>
showNewLine LF
"\n"
Split text into lines, return lines and detected newline separator.
>>>
lines' "foo\nbar"
(LF,["foo","bar"])