getLine

Read a line from the standard input device. getLine is implemented as hGetLine stdin. This operation may fail with the same errors as hGetLine.

Examples

>>> getLine
> Hello World!
"Hello World!"
>>> getLine
>
""
Deprecated: Deprecated since bytestring-0.12. Use getLine instead. (Functions that rely on ASCII encodings belong in Data.ByteString.Char8)
Read a line from stdin.
Read a single line of user input from stdin.
Read a single line of user input from stdin.
Read a line from the standard input device (same as hGetLine stdin).
Lifted version of getLine.
Lifted getLine
Read a line from stdin Uses system locale settings
Read one line
Read one line from a file
Get line with given 0-based index, O(1). The result does not contain \n characters.. Returns mempty if the line index is out of bounds.
>>> :set -XOverloadedStrings

>>> map (\l -> getLine l "fя𐀀\n☺bar\n\n") [0..3]
["fя𐀀","☺bar","",""]
Get a line by its 0-based index. Returns mempty if the index is out of bounds. The result doesn't contain \n characters.
>>> :set -XOverloadedStrings

>>> map (\l -> getLine l "foo\nbar\n😊😊\n\n") [0..3]
["foo","bar","😊😊",""]
Read a single line of user input from stdin
Deserialize a linear type.
Gets the current line cap style, as set by setLineCap.
Gets the current line join style, as set by setLineJoin.
Gets the current line width, as set by setLineWidth.