Libft is a custom implementation of standard C library functions developed as part of the 42 Yerevan curriculum. The project focuses on understanding how low-level functions work and building a personal reusable C library.
- Reimplementation of core libc functions (
strlen,memcpy,atoi, etc.) - Advanced string and memory manipulation
- Dynamic memory allocation (
malloc,calloc,free) - Full linked list implementation
- Clean and modular code structure
- C
- Linux
- Makefile
makeThis will generate the libft.a static library.
Include the library in your project:
#include "libft.h"#include "libft.h"
#include <stdio.h>
int main(void)
{
char *str = "42 Yerevan";
printf("Length: %d\n", ft_strlen(str));
char *dup = ft_strdup(str);
printf("Duplicate: %s\n", dup);
free(dup);
return 0;
}- Memory management and pointer manipulation
- Implementation of low-level standard functions
- Writing clean, reusable, and modular C code
- Debugging and handling edge cases
- Understanding data structures (linked lists)
- Libc functions – basic standard functions reimplemented
- Additional functions – extended string and utility functions
- Linked list – full implementation of list operations
This project serves as a foundation for future C projects, allowing reuse of custom-built functions and deeper understanding of system-level programming.
Aghvan Aleksanyan 42 Yerevan Student