Giter Site home page Giter Site logo

xplore93 / get_next_line Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

May it be a file, stdin, or even later a network connection, I will always need a way to read content line by line. It is time to start working on this function, which will be essential for my future projects.

C 100.00%
42born2code 42madrid get-next-line

get_next_line's Introduction

get_next_line - @42Madrid

MARK


Text


What is get_next_line?

May it be a file, stdin, or even later a network connection, I will always need a way to read content line by line. It is time to start working on this function, which will be essential for my future projects.

What we have there?

A function that reads a file descriptor and return a line when new line found or there is end of file. It is implemented using static variable to maintain data while the program runs. A file with utils and a header file.

int	get_next_line(int fd, char **line)
Description Param. #1 Param. #2 Return Value
Write a function which returns a line read from a file descriptor, without the newline file descriptor for reading The value of what has been read 1 : A line has been read; 0 : EOF has been reached -1 : An error happened

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.