Libft is your very first own library in 42cursus.
The aim of this project is to code a C library regrouping usual functions that you'll be allowed to use in all your other projects.
- Mandatory Part 1
In this first part, you must re-code a set of the libc
functions, as defined in their man
.
Your functions will need to present the same prototype and behaviors as the originals.
Your functions' names must be prefixed by "ft_
".
For instance strlen
becomes ft_strlen
.
memset bzero memcpy memccpy memmove memmove memchr memcmp
strlen strlcpy strlcat strchr strrchr strnstr strncmp atoi
isalpha isdigit isalnum isascii isprint toupper tolower
calloc strdup
- Mandatory Part 2
In this second part, you must code a set of functions that are either not included in the libc
, or included in a different form.
Some of these functions can be useful to write Part1's functions.
ft_substr ft_strjoin ft_strtrim ft_split ft_itoa ft_strmapi
ft_putchar_fd ft_putstr_fd ft_putendl_fd ft_putnbr_fd
- Bonus
Having functions to manipulate memory and strings is very useful, but you'll soon discover that having functions to manipulate lists is even more useful.
ft_lstnew ft_lstadd_front ft_lstsize ft_lstlast ft_lstadd_back
ft_lstdelone ft_lstclear
ft_lstiter ft_lstmap