diff --git a/README.md b/README.md new file mode 100644 index 0000000..179cc61 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# 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. diff --git a/subject.pdf b/subject.pdf new file mode 100644 index 0000000..0d1dc1d --- /dev/null +++ b/subject.pdf @@ -0,0 +1,131 @@ + + +
+ + + + + + + + + + + +