Navigation

Operators and Keywords

Function List:

C++ API

: str = fgetl (fid)
: str = fgetl (fid, len)

Read characters from a file, stopping after a newline, or EOF, or len characters have been read.

The characters read, excluding the possible trailing newline, are returned as a string.

If len is omitted, fgetl reads until the next newline character.

If there are no more characters to read, fgetl returns -1.

To read a line and return the terminating newline see fgets.

See also: fgets, fscanf, fread, fopen.

Package: octave