Skip to content

Clocon/get_next_line-42

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GET_NEXT_LINE

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.

image

Mandatory Part

image

Project Description

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.

Usage

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.

Links to my other projects at 42:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages