| readLine |
(Stream stream) |
yoix.io |
| |
Reads characters from
stream
up to the next newline or end-of-stream,
stores them in a new string,
and returns that string or
NULL
if there is nothing to read or an error occurs.
| |
| Example: |
On a UNIX-like system the program,
import yoix.io.*;
String line;
File file;
if ((file = open("/etc/passwd", "r")) != NULL) {
while ((line = readLine(file)) != NULL)
writeLine(stdout, line);
close(file);
}
copies the system password file to standard output, one line
at a time.
| | |
| Return: |
String
| | |
| See Also: |
read,
readChar,
readStream,
ready
|
|
Yoix is a registered trademark of AT&T Inc.
|