42_get_next_line/README.md

32 lines
1.1 KiB
Markdown
Raw Normal View History

2023-03-27 10:01:52 -04: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](./subject.pdf)
- 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.