This is my implementation of the get_next_line project for the Cursus 42 program. The get_next_line function reads a file descriptor (fd) line by line, returning each line as a string.
The get_next_line function takes in a file descriptor (fd) and a pointer to a character string. It reads from the file descriptor until a newline character is encountered, at which point it returns the line as a string. The newline character is not included in the returned string.
If the end of the file is reached before a newline character is encountered, the rest of the file is still returned as a string.
The get_next_line function can be called repeatedly until the entire file has been read.
To use the get_next_line function in a program, it includes the get_next_line.h header file and can be linked with the libft library, in this case, I use a get_next_line_utils.c file to collect the necessary functions from it.