/get_next_line

1337 - 42 cursus (get_next_line project)

Primary LanguageC

# **************************************************************************** #
#                                                                              #
#                                                         :::      ::::::::    #
#    get_next_line                                      :+:      :+:    :+:    #
#                                                     +:+ +:+         +:+      #
#    By: aachhoub <aachhoub@student.1337.ma>        +#+  +:+       +#+         #
#                                                 +#+#+#+#+#+   +#+            #
#    Created: 2022/12/04      by aachhoub              #+#    #+#              #
#    Updated: 2022/12/04      by aachhoub             ###   ########.fr        #
#                                                                              #
# **************************************************************************** #

get_next_line

File system basics (open-file table, file-descriptor table), file manipulation (open, read, write, create), static variables.

Functions:

  • get_next_line: on each call it returns the next line from a file, if no lines are found it returns NULL.
  • ft_get_nl: returns the index of the next new line or -1 if no new line character found.
  • ft_get_line: returns the current line.
  • ft_get_rest: returns what remains after excluding the current line.
  • ft_substr: return a substring from a string.
  • ft_strdup: creates a new copy of a string and returns a pointer to it.
  • ft_strdjoin: creates a new string that hold two strings joined and returns a pointer to it.
  • ft_strlen: returns the length of a string.

Author:

Abdo Achhoubi