The first project required at the 42 School - São Paulo curriculum.
The goal is to re-write popular C functions from scratch and build our very own library. Check the Subject here.
Documenting the functions was not required but it was very useful, especially regarding the didactic nature of the project and it's beginner status.
42 is a Software Engineering school with a very human and collaborative approach. There are no teachers. Students receive challenging projects from the school but must pursue knowledge among themselves. Sharing, teaching and collaborating are key.
Include the library using :
#include "libft.h"
Open the terminal on the directory where this repository was cloned and use the following commands:
- To compile, index and create the library (.a file)
make
- Erase objetcs (.o)
make clean
Other commands may be found inside the Makefile.
*Every function is preceeded by the suffix ft_ as per requested
*The bonus part refers to linked list manipulation
Part 1 | Part 2 | Bonus Part | Aditional Functions |
---|---|---|---|
ft_atoi | ft_itoa | ft_lstadd_back | ft_putnbr |
ft_bzero | ft_putchar_fd | ft_lstadd_front | ft_putchar |
ft_calloc | ft_putendl_fd | ft_lstclear | ft_putstr |
ft_isalnum | ft_putnbr_fd | ft_lstdelone | ft_putendl |
ft_isalpha | ft_putstr_fd | ft_lstiter | ft_isspace |
ft_isascii | ft_split | ft_lstlast | |
ft_isdigit | ft_strjoin | ft_lstmap | |
ft_isprint | ft_strmapi | ft_lstnew | |
ft_memccpy | ft_strtrim | ft_lstsize | |
ft_memchr | ft_substr | ||
ft_memcmp | |||
ft_memcpy | |||
ft_memmove | |||
ft_memset | |||
ft_strchr | |||
ft_strdup | |||
ft_strlcat | |||
ft_strlen | |||
ft_strncmp | |||
ft_strnstr | |||
ft_strrchr | |||
ft_tolower | |||
ft_toupper |
There a three great tests, made by students:
- Libftest, by jtoty
- Libf Unit Test, by Antoine Lelievre
- Libft War Machine, by ska42
- Libft Destructor, by Tom Marx
If you are a student working on your own library: be strong and try to make your own mains and tests!
-
AdressSanitizer - a tool made by Google to detect memory leaks and errors in C/C++.
It should be used as a compilation flag along with -g, to debug:
gcc -Wall -Werror -Wextra -fsanitize=address -g
-
Repl.it - IDE on the browser
-
C Tutor - a visual tool to debug code on the browser