Skip to content

julmajustus/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libft - A Partial glibc Reimplementation in C

A custom reimplementation of key GNU C Library (glibc) functions written in C. This project serves as both a learning exercise and a reusable library, providing you with a deeper understanding of low-level operations, memory management, string manipulation, and basic data structures.


Overview

libft is a collection of utility functions that mirror many of the standard C library routines. By re-creating these functions, you not only reinforce your understanding of C fundamentals but also build a library that can be used to simplify future projects.


Features

  • Memory Management:

    • ft_calloc, ft_bzero
    • ft_memchr, ft_memcmp, ft_memcpy, ft_memmove, ft_memset
  • String Manipulation:

    • ft_strlen, ft_strchr, ft_strcmp, ft_strdup
    • ft_strjoin, ft_strtrim, ft_split, ft_strncmp, ft_strnstr, ft_strrchr
  • Conversion Utilities:

    • ft_atoi, ft_atof, ft_atoll, ft_itoa
  • Character Checks & Case Conversion:

    • ft_isalnum, ft_isalpha, ft_isascii, ft_isdigit, ft_isprint, ft_isspace
    • ft_tolower, ft_toupper
  • Additional Utilities:

    • Array and character append functions (ft_append_arr, ft_append_char)
    • Reallocation with ft_realloc
    • File descriptor based output functions (ft_putchar_fd, ft_putendl_fd, ft_putnbr_fd, ft_putstr_fd)
  • Linked List Operations (Bonus):

    • Functions like ft_lstnew_bonus, ft_lstadd_front_bonus, ft_lstadd_back_bonus, ft_lstsize_bonus, ft_lstclear_bonus, etc.
  • Line Reading:

    • The get_next_line module for efficient line-by-line file reading.

Install

Clone the repository and build the library:

git clone https://github.com/julmajustus/libft.git
cd libft
make

Usage

Include the library header in your source code:

#include "libft.h"

Compile your program along with the library archive. For example:

gcc -o my_program my_program.c libft.a

About

42-School project libft

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published