The Libft project involves creating a custom C library that mimics standard C library functions as well as additional utilities for string manipulation, memory management, linked lists, and more. This project serves as a foundational step in mastering C programming, focusing on low-level memory operations and algorithm efficiency.
Libft includes a variety of functions divided into several categories:
Functions that mirror those found in <string.h>, <ctype.h>, and <stdlib.h>, such as:
ft_memset,ft_bzero,ft_memcpyft_strlcpy,ft_strlen,ft_strdupft_atoi,ft_isalpha,ft_toupper, etc.
Functions for efficient memory allocation and manipulation:
ft_calloc: Allocate memory and initialize it to zeroft_memmove: Safely move overlapping memory blocks
Useful string handling utilities for common operations:
ft_strjoin: Concatenate two stringsft_substr: Extract a substring from a given stringft_split: Split a string by a delimiter
Basic linked list management functions:
ft_lstnew: Create a new linked list nodeft_lstadd_front: Add a node at the beginning of the listft_lstmap: Apply a function to each node and create a new list
- Compiler: The project is written in C, and it requires
gccor any other compatible C compiler. - Makefile: A
Makefileis included to streamline compilation.
To compile the library, simply run the following command in the root directory:
make