My implementation of Libft, the first 42 School Project!
-
Standard Libc Functions:
- Functions like
ft_strlen
,ft_strdup
, andft_toupper
mimic the behavior ofstrlen
,strdup
, andtoupper
from the standard C library.
- Functions like
-
Additional Functions:
- Functions like
ft_substr
,ft_strjoin
, andft_strtrim
which are not available in the standard library but are very useful in handling strings.
- Functions like
-
Bonus Functions:
- Functions that work with linked lists, like
ft_lstnew
,ft_lstadd_front
, andft_lstsize
.
- Functions that work with linked lists, like
-
String Functions:
- Handle string manipulations and queries, e.g.,
ft_strlcat
,ft_strncmp
, andft_strnstr
.
- Handle string manipulations and queries, e.g.,
-
Memory Functions:
- Deal with memory operations, e.g.,
ft_memset
,ft_memcpy
, andft_memmove
.
- Deal with memory operations, e.g.,
-
Character Check Functions:
- Check character types, e.g.,
ft_isdigit
,ft_isalpha
, andft_isprint
.
- Check character types, e.g.,
-
List Functions:
- Perform operations on linked lists, e.g.,
ft_lstmap
,ft_lstiter
, andft_lstclear
.
- Perform operations on linked lists, e.g.,
-
File Descriptor Functions:
- Perform output operations on file descriptors, e.g.,
ft_putchar_fd
,ft_putstr_fd
, andft_putendl_fd
.
- Perform output operations on file descriptors, e.g.,
- We use
libft
in our C projects to utilize basic and additional utility functions. - It helps us to manage strings, memory, and linked lists without using the standard library functions.
- It provides a foundation for understanding how standard functions work internally.
- The
Makefile
inlibft
compiles source files into object files and archives them into a static library. - It allows for easy compilation and usage of the library in other projects.
Libft
is foundational and is used in many subsequent projects in the 42 curriculum.- It enhances understanding and implementation skills related to strings, memory, and linked lists in C programming.
- It encourages code reuse, as we can utilize this library in future projects, saving time and ensuring reliability.