Giter VIP home page Giter VIP logo

libft's Introduction

Libft Introduction

Libft (Library of Functions)

In this project, you will be creating a library of functions, the file structure for this project is the following:

.c Files

Where all of your functions will be written in.

.h (Header)

Your header file is useful for 2 things:

  • First, instead of doing for example #include <unistd.h> in all of your .c files, you just write it once in your header and all of your .c files will read it from your header file.
  • Secondly, let's say one of your .c files uses another function from another .c file, well instead of writting that function above, just write #include "libft.h" and it will find it in your header file.

Make sure you add #include "libft.h" in all of your .c files.

Makefile

Makefile is where you will create a file to compile your projects. Remember how in the piscine, you created an int main and gcc to compile the projects, well with a Makefile, you don't have to do that anymore, you just type make once you have created your Makefile.

Great Resource for Libft

https://www.asidesigned.com/project-libft.html

Libft Functions

Functions from <ctype.h>

Functions from <string.h>

Functions from <stdlib.h>

  • ft_atoi - convert a string to an integer.
  • ft_calloc - allocates memory and sets its bytes' values to 0.

Non-standard functions

  • ft_substr - returns a substring from a string.
  • ft_strjoin - concatenates two strings.
  • ft_strtrim - trims the beginning and end of string with specific set of chars.
  • ft_split - splits a string using a char as parameter.
  • ft_itoa - converts a number into a string.
  • ft_strmapi - applies a function to each character of a string.
  • ft_striteri - applies a function to each character of a string.
  • ft_putchar_fd - output a char to a file descriptor.
  • ft_putstr_fd - output a string to a file descriptor.
  • ft_putendl_fd - output a string to a file descriptor, followed by a new line.
  • ft_putnbr_fd - output a number to a file descriptor.

Linked list functions

Link To Libft Tester

https://github.com/pasqualerossi/42-Cursus-Tester

My Libft Results

Screen Shot 2021-09-29 at 4 37 29 PM

Screen Shot 2021-09-29 at 5 01 51 PM

image

libft's People

Contributors

pasqualerossi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

libft's Issues

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.