GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codebit-hub/Libft: Rewriting standard C library functions (libc), including addition of useful utility functions and node manipulation

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
Makefile
Makefile
 
 
README.md
README.md
 
 
ft_atoi.c
ft_atoi.c
 
 
ft_bzero.c
ft_bzero.c
 
 
ft_calloc.c
ft_calloc.c
 
 
ft_isalnum.c
ft_isalnum.c
 
 
ft_isalpha.c
ft_isalpha.c
 
 
ft_isascii.c
ft_isascii.c
 
 
ft_isdigit.c
ft_isdigit.c
 
 
ft_isprint.c
ft_isprint.c
 
 
ft_itoa.c
ft_itoa.c
 
 
ft_lstadd_back_bonus.c
ft_lstadd_back_bonus.c
 
 
ft_lstadd_front_bonus.c
ft_lstadd_front_bonus.c
 
 
ft_lstclear_bonus.c
ft_lstclear_bonus.c
 
 
ft_lstdelone_bonus.c
ft_lstdelone_bonus.c
 
 
ft_lstiter_bonus.c
ft_lstiter_bonus.c
 
 
ft_lstlast_bonus.c
ft_lstlast_bonus.c
 
 
ft_lstmap_bonus.c
ft_lstmap_bonus.c
 
 
ft_lstnew_bonus.c
ft_lstnew_bonus.c
 
 
ft_lstsize_bonus.c
ft_lstsize_bonus.c
 
 
ft_memchr.c
ft_memchr.c
 
 
ft_memcmp.c
ft_memcmp.c
 
 
ft_memcpy.c
ft_memcpy.c
 
 
ft_memmove.c
ft_memmove.c
 
 
ft_memset.c
ft_memset.c
 
 
ft_putchar_fd.c
ft_putchar_fd.c
 
 
ft_putendl_fd.c
ft_putendl_fd.c
 
 
ft_putnbr_fd.c
ft_putnbr_fd.c
 
 
ft_putstr_fd.c
ft_putstr_fd.c
 
 
ft_split.c
ft_split.c
 
 
ft_strchr.c
ft_strchr.c
 
 
ft_strdup.c
ft_strdup.c
 
 
ft_striteri.c
ft_striteri.c
 
 
ft_strjoin.c
ft_strjoin.c
 
 
ft_strlcat.c
ft_strlcat.c
 
 
ft_strlcpy.c
ft_strlcpy.c
 
 
ft_strlen.c
ft_strlen.c
 
 
ft_strmapi.c
ft_strmapi.c
 
 
ft_strncmp.c
ft_strncmp.c
 
 
ft_strnstr.c
ft_strnstr.c
 
 
ft_strrchr.c
ft_strrchr.c
 
 
ft_strtrim.c
ft_strtrim.c
 
 
ft_substr.c
ft_substr.c
 
 
ft_tolower.c
ft_tolower.c
 
 
ft_toupper.c
ft_toupper.c
 
 
libft.h
libft.h
 
 
main.c
main.c
 
 

Repository files navigation

This project has been created as part of the 42 curriculum by dporhomo.

Libft

Score Language Completion Date

💡 About The Project

Libft is the first project of the 42 Core Curriculum. The goal is to create a custom C library named libft.a by rewriting standard C library functions and adding useful utility functions. This library will be used in almost all future 42 projects.

Project Status: ✅ Completed: Mandatory & Bonus Parts.

📂 Function List

Part 1: Libc Functions

Re-implementation of standard C library functions.

Character String Memory Numbers/Other
ft_isalpha ft_strlen ft_memset ft_atoi
ft_isdigit ft_strlcpy ft_bzero ft_calloc
ft_isalnum ft_strlcat ft_memcpy ft_tolower
ft_isascii ft_strchr ft_memmove ft_toupper
ft_isprint ft_strrchr ft_memchr
ft_strncmp ft_memcmp
ft_strnstr ft_strdup

Part 2: Additional Functions

Useful string manipulation functions not present in standard libc.

Function Description
ft_substr Allocates and returns a substring from the string 's'.
ft_strjoin Allocates and returns a new string, result of 's1' + 's2'.
ft_strtrim Trims characters specified in 'set' from start/end of 's1'.
ft_split Splits a string using a delimiter and returns an array of strings.
ft_itoa Converts an integer to a string (char *).
ft_strmapi Applies a function to each character of a string (creates new string).
ft_striteri Applies a function to each character of a string (in place).
ft_putchar_fd Outputs a char to a file descriptor.
ft_putstr_fd Outputs a string to a file descriptor.
ft_putendl_fd Outputs a string followed by a newline to a FD.
ft_putnbr_fd Outputs an integer to a file descriptor.

Part 3: Bonus Functions (Linked Lists)

Functions to manipulate t_list structures.

Function Description
ft_lstnew Creates a new list node.
ft_lstadd_front Adds a node to the beginning of a list.
ft_lstsize Counts the number of nodes in a list.
ft_lstlast Returns the last node of the list.
ft_lstadd_back Adds a node to the end of a list.
ft_lstdelone Deletes a node and frees its content.
ft_lstclear Deletes and frees a node and all successors.
ft_lstiter Applies a function to the content of every node.
ft_lstmap Applies a function to a list and creates a new list with results.

🛠️ Usage

Requirements

  • gcc or clang compiler.
  • Standard C libraries.

Compilation

To compile the library, run the following in the root directory:

make        # Compiles mandatory functions
make bonus  # Compiles mandatory + bonus functions
cc -Wall -Werror -Wextra main.c -L. -lft -lbsd -o test_prog

About

Rewriting standard C library functions (libc), including addition of useful utility functions and node manipulation

Topics

42cc-fundamentalslibft

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.