Go to file
Camille Chauvet 9b1684a85a add: README
2023-03-27 16:01:52 +02:00
get_next_line_bonus.c fd > 1024 fix 2022-11-23 15:28:59 +01:00
get_next_line_bonus.h final mais vraiment 2022-11-14 17:31:11 +01:00
get_next_line_utils_bonus.c bonus fix 2022-11-14 15:53:40 +01:00
get_next_line_utils.c bonus, first implementation 2022-11-14 15:45:44 +01:00
get_next_line.c bonus, first implementation 2022-11-14 15:45:44 +01:00
get_next_line.h final mais vraiment 2022-11-14 17:31:11 +01:00
README.md add: README 2023-03-27 16:01:52 +02:00
subject.pdf add: README 2023-03-27 16:01:52 +02:00

get_next_line

This is my implementation of the get_next_line project for the 42 school.

Description

get_next_line is a function that reads a file descriptor (FD) line by line until the end of file (EOF) or an error occurs.

The function returns each line as a string, without the line break character '\n'.

The purpose of the project is to provide a function for reading lines from a file descriptor, which can be useful for various applications.

Usage

To use the function, simply include the header file and call the function with the file descriptor as the first argument.

The function will return:

  • The line: if a line has been read
  • Empty string: if the end of file has been reached
  • NULL: if an error occurred

It is important to note that the function uses dynamic memory allocation to return the line as a string, so it is necessary to free the memory after use.

Resources

  • The project subject
  • The standard C library documentation

Authors

This project was created by Camille CHAUVET. If you have any questions or suggestions, feel free to contact me.