NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
string fgets ( string &  str,
int  num,
byte  handle 

Get string from file.

Reads characters from a file and stores them as a string into str until (num-1) characters have been read or either a newline or a the End-of-File is reached, whichever comes first. A newline character makes fgets stop reading, but it is considered a valid character and therefore it is included in the string copied to str. A null character is automatically appended in str after the characters read to signal the end of the string. Returns the string parameter.

strThe string where the characters are stored.
numThe maximum number of characters to be read.
handleThe handle of the file from which the characters are read.
The string read from the file.
ex_fgets.nxc, and ex_fopen.nxc.