fgetline¶
The fgetline function reads a string from the input file and stores it in a string.
- ssString = fgetline(fh)
Return Value
ssString is a scalar string. In case of an error or at the end of file, an empty string is returned.
Parameters
- fh
fh is a file handle created by calling the fopen function.
Comment
The newline character, if read, is included in the string. The function reads from the current position to the end of the line. The line length is not limited.
History
Version |
Description |
---|---|
5.10.0 |
Supports reading Unicode files (utf8, utf16-le, utf16) if the file contains a byte order mark (BOM) and if the file is opened for reading in text mode (“rt”). |
5.0.0 |
As in UniPlot 4.x only 8-bit character sets can be read. |
See also
Overview Binary and Text Files, text_file_read, fopen, fseek, feof
id-963517