Skip to content

Function that returns a line read from a file descriptor

Notifications You must be signed in to change notification settings

itiievskyi/Get_Next_line

Repository files navigation

Get_Next_line (42 School Project)

Function that returns a line read from a file descriptor.

  • “Line” is a succession of characters that end with ’\n’ (ascii code 0x0a) or with End Of File (EOF).
  • The first parameter is the file descriptor that will be used to read.
  • The second parameter is the address of a pointer to a character that is used to save the line read from the file descriptor.
  • The return value can be 1, 0 or -1 depending on whether a line has been read, when the reading has been completed, or if an error has happened respectively.
  • Function get_next_line returns its result without ’\n’.

How to use

Download and use get_next_line.c and get_next_line.h in your program.

Enjoy!

About

Function that returns a line read from a file descriptor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published