libft is a project at 42 that involves creating a custom C library compiling a variety of standard and extra functions that can be reused in future projects. This library aims to mimic a subset of the C Standard Library functions, along with additional utility functions.
- Recreation of standard C library functions like
strlen,strcpy,strcmp, etc. - Creation of a set of utility functions to manipulate strings, numbers, and memory.
The bonus part of libft includes aditional functions that deal with basic operations in regards to linked lists, such as their creation and deletion.
To clone the repository use:
git clone https://github.com/moop250/libft.gitCompilation & cleanup:
make: Compiles the library and creates the archive.make bonus: Compiles the library + bonus funcitons and creates the archive.make clean: Cleans up all object files (.o).make fclean: Cleans up the object files and the libft.a library archive.make re: Does a make fclean followed by a make to recompile the library.
Example usage in a C program:
#include "libft.h"
int main(void)
{
char *s = "Hello, World!";
size_t len = ft_strlen(s);
// use other libft functions as needed
}