[−][src]Function avr_libc::fgets
pub unsafe extern "C" fn fgets(
__str: *mut i8,
__size: i16,
__stream: *mut FILE
) -> *mut i8
Read at most size - 1 bytes from \c stream, until a newline character was encountered, and store the characters in the buffer pointed to by \c str. Unless an error was encountered while reading, the string will then be terminated with a \c NUL character.
If an error was encountered, the function returns NULL and sets the error flag of \c stream, which can be tested using ferror(). Otherwise, a pointer to the string will be returned.