My very first own library and the first 42 Common Core project!
Libft aims at creating a custom C library with essential functions that will be invaluable for future projects in the 42 Common Core curriculum. This library is designed to provide you with a solid foundation of fundamental functions commonly used in C language. In the journey of becoming a proficient C programmer, understanding the inner workings of basic functions is crucial. Libft not only serves as a compilation of essential functions but also offers you the opportunity to recreate these functions from scratch. This process enhanced my understanding of data structures, algorithmic thinking, and the intricacies of C programming.
Libft includes a variety of functions, each one crafted to provide a solid understanding of their underlying principles. Some of the functions you will find include:
- String Manipulation:
ft_strlen
,ft_strcpy
,ft_strcat
, etc. - Character Functions:
ft_isalpha
,ft_isdigit
,ft_isalnum
, etc. - Memory Functions:
ft_memcpy
,ft_memset
,ft_memmove
, etc. - Printing Functions:
ft_putchar_fd
,ft_putstr_fd
,ft_putnbr_fd
, etc. - Comparison Functions:
ft_memcmp
,ft_strcmp
,ft_strncmp
. - Data Conversion Functions:
ft_atoi
,ft_itoa
. - List Manipulation Functions (Bonus):
ft_lstnew
,ft_lstadd_front
,ft_lstsize
, etc.
At 42 School, we need to follow some strict rules when writing our code. These rules are described in the Norm and checked by the formidable norminette
. Here are some of them:
- No for, do...while, switch, case, goto, ternary operators and variable-length arrays are allowed
- Each function must be maximum 25 lines
- One single variable declaration per line
- You can’t declare more than 5 variables per function
- You can't write more thane 5 functions per file
...
Click here to review the complete Norm document.