contents   index   previous   next



Clib.fgets()

syntax:

Clib.fgets([length,] filePointer)

where:

length - maximum length of string.

 

filePointer - pointer to file to use.

 

return:

string - the characters in a file from the current file cursor to the next newline character on success, else null.

 

description:

This method returns a string consisting of the characters in a file from the current file cursor to the next newline character. The newline will be returned as part of the string. If there is an error or the end of the file is reached, null will be returned.

 

A second syntax of this function takes a number as its first parameter. This number is the maximum length of the string to be returned if no newline character was encountered.

 

see:

Clib.fgetc()

 

 


Clib.fprintf()