Thanks to visit codestin.com
Credit goes to github.com

Skip to content

melaniereis/42_libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟 42_libft

📖 Project Overview

Click to expand

libft is a custom C library project, part of the 42 School curriculum. This project aims to:

  • Recreate various standard C library functions
  • Develop additional utility functions
  • Enhance understanding of basic algorithms and data structures
  • Improve C programming skills

The library serves as a foundation for future projects in the 42 curriculum.

✨ Features

Key Features
  • 🔄 Reimplementation of standard C library functions
  • 🧰 Additional utility functions for string and memory operations
  • 🔗 Bonus functions for linked list manipulations
  • 🧪 Thoroughly tested for reliability
  • 📚 Comprehensive documentation

🚀 Installation

Step-by-step guide
  1. Clone the repository:
    git clone [email protected]:melaniereis/42_libft.git
    cd 42_libft
  2. Compile the library:

bash make

  1. To include bonus functions:

bash make bonus

💻 Usage
How to use libft in your projects
  1. Include the header in your C file:

    #include "libft.h"

  2. Compile your program with the library:

bash cc your_program.c -L. -lft -o your_program

  1. Example usage:

#include "libft.h" #include <stdio.h>

int main() { char *str = ft_strdup("Hello, libft!"); printf("%s\n", str); free(str); return 0; }

📚 Function List
Libc Functions
Character checks: ft_isalpha, ft_isdigit, ft_isalnum, ft_isascii, ft_isprint
String operations: ft_strlen, ft_strlcpy, ft_strlcat, ft_strchr, ft_strrchr, ft_strncmp, ft_strnstr
Memory operations: ft_memset, ft_bzero, ft_memcpy, ft_memmove, ft_memchr, ft_memcmp
Character conversions: ft_toupper, ft_tolower
String to integer: ft_atoi
Memory allocation: ft_calloc, ft_strdup
Additional Functions
String manipulations: ft_substr, ft_strjoin, ft_strtrim, ft_split, ft_itoa, ft_strmapi, ft_striteri
File descriptor operations: ft_putchar_fd, ft_putstr_fd, ft_putendl_fd, ft_putnbr_fd
Bonus Functions
Linked list operations: ft_lstnew, ft_lstadd_front, ft_lstsize, ft_lstlast, ft_lstadd_back, ft_lstdelone, ft_lstclear, ft_lstiter, ft_lstmap
📁 Project Structure
File organization

text . ├── libft.h # Header file ├── ft_*.c # Source files for each function ├── Makefile # Compilation rules └── README.md # Project documentation

🧹 Cleaning Up
Maintenance commands
  1. Remove object files:

    bash make clean

  2. Remove object files and the library:

bash make fclean

  1. Recompile everything:

bash make re

👩‍💻 Author
Melanie Reis
🏫 42 School Student
💼 LinkedIn
🐙 GitHub
📄 License This project is licensed under the MIT License - see the LICENSE file for details. 🙏 Acknowledgments
Special thanks
42 School for the comprehensive curriculum
The C Programming Language by Brian Kernighan and Dennis Ritchie
Fellow 42 students for their support and collaboration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published