Libft is the first project at Hive Helsinki (and 42 Network). It aims to build a personal C standard library by reimplementing a selection of libc functions and adding useful utilities for future C projects.
This project develops a static C library (libft.a) containing a set of functions that mimic and extend parts of the standard C library. It helps solidify understanding of:
- Memory allocation and manipulation
- String handling
- Linked lists
- Function pointers
- Static libraries
The library includes (but is not limited to):
ft_strlen,ft_strdup,ft_strchr,ft_strrchr,ft_strncmp,ft_strlcpy,ft_strlcat,ft_strnstrft_memset,ft_bzero,ft_memcpy,ft_memmove,ft_memchr,ft_memcmpft_atoift_isalpha,ft_isdigit,ft_isalnum,ft_isascii,ft_isprintft_toupper,ft_tolowerft_calloc
ft_substr,ft_strjoin,ft_strtrim,ft_split,ft_itoa,ft_strmapi,ft_striterift_putchar_fd,ft_putstr_fd,ft_putendl_fd,ft_putnbr_fd
ft_lstnew,ft_lstadd_front,ft_lstsize,ft_lstlast,ft_lstadd_back,ft_lstdelone,ft_lstclear,ft_lstiter,ft_lstmap
To compile the library:
makeTo use it in your project:
- Include the header:
#include "libft.h" - Compile with the library:
cc main.c -L. -lft