/libft

Libft is a custom C library that replicates key functions from the standard library, adding utilities for string handling, memory management, and data structures. It's a foundational toolkit for C developers, ideal for optimizing and reusing core functions in projects.

Primary LanguageC

Libft - Custom C Library

Your essential C toolkit for mastering foundational programming concepts.
For more information about the 42 curriculum and its projects, visit the 42cursus repository.

Code Size Top Language Last Commit


About

Libft is a comprehensive C library that replicates and enhances essential functions from the standard library, along with additional tools like linked list utilities. This project is a fundamental part of the 42 School curriculum and serves as a base for many other projects.

🚀 Goal: To code and compile basic C functions into a reusable library.

Usage

Requirements

  • CC compiler
  • Standard C libraries

Compilation

To compile the library, navigate to the project directory and run:

make

Functions

The libft library includes a range of functions that replicate the standard C library and extend it with new utilities. Here is a summary of the core functions:

-----> Standard Library Functions

ft_memset - Fill a block of memory with a particular value
ft_strlen - Calculate the length of a string.
ft_strcpy - Copy a string to a destination.
ft_strcmp - Compare two strings.
ft_strdup - Duplicate a string in memory.
And many more...

-----> Memory Management

ft_memcpy - Copy a block of memory.
ft_memmove - Move a block of memory, safely handling overlaps.
ft_calloc - Allocate and zero-initialize memory.

-----> String Manipulation

ft_strjoin - Join two strings into a new one.
ft_split - Split a string into an array of strings based on a delimiter.
ft_substr - Extract a substring from a string.