res = fgetl(f)
| Parameter | Description |
|---|---|
| f | a file descriptor |
| Parameter | Description |
|---|---|
| res | a string or -1 |
Read string from a file, stopping after a newline or EOF have been read.
If there is no more character to read, fgets will return -1.
newline character removed of the string returned
characters encoding uses fopen parameter.
fid = fopen([nelsonroot(), '/etc/startup.m']);
tline = fgetl(fid);
while ischar(tline)
disp(tline)
tline = fgetl(fid);
end
fclose(fid);
| Version | Description |
|---|---|
| 1.0.0 | initial version |