diff options
author | Patrik Nyblom <pan@erlang.org> | 2009-12-03 15:14:18 +0000 |
---|---|---|
committer | Erlang/OTP <otp@erlang.org> | 2009-12-03 15:14:18 +0000 |
commit | 80afa01bca08e875fca796f277ec4be0cc71c387 (patch) | |
tree | 6ca9e1359c4c5758bd2b0033817f77a8b72bcc4e /lib/kernel | |
parent | a5c08b46326835cf0144c2cb123bf4be0f54ad38 (diff) | |
download | otp-80afa01bca08e875fca796f277ec4be0cc71c387.tar.gz otp-80afa01bca08e875fca796f277ec4be0cc71c387.tar.bz2 otp-80afa01bca08e875fca796f277ec4be0cc71c387.zip |
Corrected CR and LF clarification in file:read_line, removed extra backslash.
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/doc/src/file.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index 2303617542..f9f5443f68 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -1368,7 +1368,7 @@ f.txt: {person, "kalle", 25}. </type> <desc> <p>Reads a line of bytes/characters from the file referenced by - <c>IoDevice</c>. Lines are defined to be delimited by the linefeed (LF, <c>\\n</c>) character, but any carriage return (CR, <c>\\r</c>) followed by a newline is also treated as a single LF character (the carriage return is silently ignored). The line is returned <em>including</em> the LF, but excluding any CR immediately followed by a LF. This behaviour is consistent with the behaviour of <seealso marker="stdlib:io#get_line/2">io:get_line/2</seealso>. If end of file is reached without any LF ending the last line, a line with no trailing LF is returned.</p> + <c>IoDevice</c>. Lines are defined to be delimited by the linefeed (LF, <c>\n</c>) character, but any carriage return (CR, <c>\r</c>) followed by a newline is also treated as a single LF character (the carriage return is silently ignored). The line is returned <em>including</em> the LF, but excluding any CR immediately followed by a LF. This behaviour is consistent with the behaviour of <seealso marker="stdlib:io#get_line/2">io:get_line/2</seealso>. If end of file is reached without any LF ending the last line, a line with no trailing LF is returned.</p> <p>The function can be used on files opened in <c>raw</c> mode. It is however inefficient to use it on <c>raw</c> files if the file is not opened with the option <c>{read_ahead, Size}</c> specified, why combining <c>raw</c> and <c>{read_ahead, Size}</c> is highly recommended when opening a text file for raw line oriented reading.</p> <p>If <c>encoding</c> is set to something else than <c>latin1</c>, the <c>read_line/1</c> call will fail if the data contains characters larger than 255, why the <seealso marker="stdlib:io">io(3)</seealso> module is to be preferred when reading such a file.</p> <p>The function returns:</p> |