get_next_line_bonus.c | ||
get_next_line_bonus.h | ||
get_next_line_utils_bonus.c | ||
get_next_line_utils.c | ||
get_next_line.c | ||
get_next_line.h | ||
README.md | ||
subject.pdf |
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
Authors
This project was created by Camille CHAUVET. If you have any questions or suggestions, feel free to contact me.