This project has been created as part of the 42 curriculum by edpolat.
Libft is a static library project where commonly used standard functions are reimplemented in the C language. The purpose of the project is to learn the basic structures of C, memory management, pointer usage, and the fundamentals of programming logic.
To compile the library, use the following command:
makeAs a result, a static library named libft.a is created, allowing the written functions to be used in other projects.
To remove object (.o) files:
make cleanTo remove object files together with the libft.a file:
make fcleanTo remove everything and rebuild the project from scratch:
make relibft.a contains the following functions:
- ft_isalpha
- ft_isdigit
- ft_isalnum
- ft_isascii
- ft_isprint
- ft_strlen
- ft_strlcpy
- ft_strlcat
- ft_strchr
- ft_strrchr
- ft_strncmp
- ft_strnstr
- ft_strdup
- ft_substr
- ft_strjoin
- ft_strtrim
- ft_split
- ft_strmapi
- ft_striteri
- ft_memset
- ft_bzero
- ft_memcpy
- ft_memmove
- ft_memchr
- ft_memcmp
- ft_calloc
- ft_itoa
- ft_putchar_fd
- ft_putstr_fd
- ft_putendl_fd
- ft_putnbr_fd
- ft_lstnew
- ft_lstadd_front
- ft_lstadd_back
- ft_lstsize
- ft_lstlast
- ft_lstdelone
- ft_lstclear
- ft_lstiter
- ft_lstmap
To use the library in another project:
cc main.c libft.aor:
cc main.c -L. -lftThe header file must be included in the source file:
#include "libft.h"- man pages
During this project, artificial intelligence tools were used for:
- Understanding the C compilation process (compile, assemble, link)
- Learning the structure of a Makefile
- Explaining the behavior of standard C functions
All function implementations and final decisions were made by the project owner.
edpolat