Skip to content

Forge Your Arsenal: The libft 42 Guide This repository is your forge, where you'll craft the essential tools for your programming odyssey at 42 School. Here, you'll conquer the legendary libft, a custom C library packed with functions to empower your future projects.

Notifications You must be signed in to change notification settings

MarkosComK/42-Libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

42cursus libft

Image

Development repo for 42cursus libft project
For further information about 42cursus and its projects, please refer to 42-Common-Core-Guide repo.



This is a project in daily use. If you want to see the project that i have been evaluated in 42school click in releases at the right side!

🗣️ About

The aim of this project is to code a C library regrouping usual functions that you'll be allowed to use in all your other projects.


Great Resources for Libft

42-Gitbook

Libft functions

Learn C

Makefile tutor

C-Programming-Language-2nd-Edition (PDF)

For detailed information, refer to the subject of the project

🚀 This project consists of coding basic C functions (see below), which are then compiled
into a library for use in other projects of the cursus.

Functions from <ctype.h> library

Functions from <stdlib.h> library

Functions from <strings.h> library

Functions from <string.h> library

Non-standard functions

  • ft_putchar_fd - output a character to given file.
  • ft_putstr_fd - output string to given file.
  • ft_putendl_fd - output string to given file with newline.
  • ft_putnbr_fd - output integer to given file.
  • ft_itoa - convert integer to ASCII string.
  • ft_substr - extract substring from string.
  • ft_strtrim - trim beginning and end of string with the specified characters.
  • ft_strjoin - concatenate two strings into a new string (with malloc).
  • ft_split - split string, with specified character as delimiter, into an array of strings.
  • ft_strmapi - create new string from modifying string with specified function.

Linked list functions

Note: functions marked with * are bonus functions (not mandatory by the project's subject).

🛠️ Usage

Requirements

The library is written in C language and thus needs the gcc compiler and some standard C libraries to run.

Instructions

1. Compiling the library

To compile the library, run:

$ cd path/to/libft && make

2. Using it in your code

To use the library functions in your code, simply include its header:

#include "libft.h"

and, when compiling your code, add the required flags:

-lft -L path/to/libft.a -I path/to/libft.h

📋 Testing

1. I haven`t coded a tester yet, but you can make your own test for each function. Here some third party testers that you can use.

Third-party testers

THE ANSWER IS 42

Rnpu cebwrpg bs gur 97 Pbzzba Pber pbagnvaf na rapbqrq uvag. Sbe rnpu pvepyr, bayl bar cebwrpg cebivqrf gur pbeerpg uvag arrqrq sbe gur arkg pvepyr. Guvf punyyratr vf vaqvivqhny, gurer vf bayl n cevmr sbe bar fghqrag jvaare cebivqvat nyy qrpbqrq zrffntrf. Nal nqinagntrq crbcyr pna cynl, yvxr pheerag be sbezre fgnss, ohg gur cevmr jvyy erznva flzobyvp. Gur uvag sbe guvf svefg cebwrpg vf: Ynetr pbjf trarebfvgl pbzrf jvgu punegf naq sbhe oybaqr ungf gb qrsl hccre tenivgl ureb.

About

Forge Your Arsenal: The libft 42 Guide This repository is your forge, where you'll craft the essential tools for your programming odyssey at 42 School. Here, you'll conquer the legendary libft, a custom C library packed with functions to empower your future projects.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published