libft
is a comprehensive C library that reimplements several standard C library functions along with a set of additional utilities to assist in C programming projects, especially for those working within constrained environments like the 42 School. This project serves as the cornerstone for many future 42 School projects, emphasizing the importance of a solid foundation in C programming.
The goal of libft
is to create a library of useful functions that will be used throughout your time at 42 School and beyond. This includes functions for string manipulation, memory allocation, character checking and conversion, linked list management, and more.
- String Manipulation: Functions like
ft_strlen
,ft_strdup
,ft_strjoin
, and others that handle strings. - Memory Management: Functions such as
ft_memset
,ft_memcpy
, andft_calloc
for managing memory. - Character Checks and Conversions: Includes functions like
ft_isalpha
,ft_toupper
, andft_tolower
. - Linked List Management: Utilities for creating and managing linked lists with functions like
ft_lstnew
,ft_lstadd_front
, andft_lstiter
. - Additional Utilities: A set of miscellaneous functions that can be useful in various contexts, such as converting integers to strings or splitting strings.
-
Clone the Repository
git clone https://github.com/haytham-hammioui/42_Libft_1337.git libft
-
Compile the Library Navigate to the
libft
directory and runmake
. This will compile the library and produce alibft.a
file.cd libft make
To use libft
in your C projects:
-
Include the
libft.h
header file in your C source files.#include "libft.h"
-
Compile your project along with
libft.a
. For example:gcc -o your_program your_source_files libft.a
Contributions to libft
are welcome! Whether you've found a bug, have a feature request, or want to contribute code:
- Fork the repository.
- Create a new branch for your changes.
- Add your contributions.
- Push your branch and open a pull request against the
libft
repository.
If you encounter any issues or have questions about libft
, please open an issue on the GitHub repository.