GITHUB BLOG
Ecole42 Libft
Libft – Your Very First Own Library 🧱
This project is part of the École 42 curriculum, and consists of implementing your own C library containing several commonly used libc functions and other utilities, including singly linked list manipulation.
🧠 Purpose
The goal of this project is to develop a deep understanding of standard C functions by reimplementing them manually. It also provides a solid foundation for future projects by creating a reusable and reliable library.
📁 Project Structure
📌 Part 1 – Libc Functions
Reimplementation of classic libc functions, with the ft_ prefix, including:
- Character and string:
ft_isalpha,ft_isdigit,ft_strlen,ft_strncmp,ft_strchr,ft_strrchr, etc. - Memory manipulation:
ft_memset,ft_memcpy,ft_bzero,ft_memmove,ft_memchr,ft_memcmp - Conversion and case:
ft_toupper,ft_tolower,ft_atoi - Allocation and duplication:
ft_calloc,ft_strdup
📌 Part 2 – Additional Functions
Useful functions not directly available in libc:
ft_substrft_strjoinft_strtrimft_splitft_itoaft_strmapift_striterift_putchar_fdft_putstr_fdft_putendl_fdft_putnbr_fd
⭐ Bonus – Linked Lists
Implementation of a set of functions to handle singly linked lists using the t_list structure:
Implemented functions:
ft_lstnewft_lstadd_frontft_lstsizeft_lstlastft_lstadd_backft_lstdeloneft_lstclearft_lstiterft_lstmap
🔧 Compilation
The library is compiled with:
To compile the bonus part:
Other available commands:
Compilation follows the strict flags:
-Wall -Wextra -Werror
🛠️ Rules and Constraints
- All files are located at the root of the repository.
- No external functions were used (except the allowed ones).
- No global variables were used.
- All functions follow the
Norminettecoding standard. - The project was tested for leaks and failures.
✅ Status
✔️ Project successfully completed, including the bonus part.
📚 References
- Man pages:
man strlen,man memcpy, etc. - BSD libc vs glibc (exploration for functions such as
strlcpyandstrlcat)