Skip to content

๐Ÿ“š Libft: My first project in 42 Madrid, where I recreate functions to explore their internal workings in C.

Notifications You must be signed in to change notification settings

freddyfleitas/libft_42

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

67 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Libft - @42Born2Code

Screenshoot

Table of Contents

ยฟWhat's Libft?

Libft marks the beginning of the path at 42 School. It consists of recreating key functions to understand them thoroughly, and inspires us to develop our own customized functions according to our needs.

Libft's content

  1. Libc functions: Essential functions built into C for basic programming operations.
  2. Additional functions: Complementary functions that expand the knowledge of memory allocation.
  3. Bonus functions: Extra functions that teach about linked lists manipulation.

Libft: From Easy to Difficult (According to me)

As we move forward with the project, the functions become increasingly challenging. In light of this, i have proposed a sequential list for implementation.

Libc functions:

Name Description
ft_isalpha Checks if it is an alphabetic character.
ft_isdigit Checks if it is a digit.
ft_isalnum Checks if it is alphanumeric.
ft_isascii Checks if it is an ASCII character.
ft_isprint Checks if it is a printable character.
ft_toupper Converts a character to uppercase.
ft_tolower Converts a character to lowercase.
ft_strlen Calculates the length of a string.
ft_memset Fills a block of memory with a specific byte.
ft_bzero Sets the first n bytes of memory to zero.
ft_strlcpy Safely copies a string.
ft_strchr Finds the first occurrence of a character.
ft_strrchr Finds the last occurrence of a character.
ft_strncmp Compares two strings up to n characters.
ft_strnstr Finds the first occurrence of a substring.
ft_memcpy Copies n bytes of memory from one location to another.
ft_memchr Finds the first occurrence of a byte.
ft_memcmp Compares the first n bytes of memory.
ft_atoi Converts a string to an integer.
ft_strlcat Safely concatenates strings.
ft_memmove Safely copies n bytes of memory.
ft_calloc Allocates memory and initializes it to zero.
ft_strdup Duplicates a string into a newly allocated space.

Additional functions:

Name Description
ft_substr Creates a substring from a string.
ft_strjoin Joins two strings into a new string.
ft_strtrim Trims the beginning and end of a string.
ft_itoa Converts an integer to a string.
ft_split Splits a string into an array of strings.
ft_strmapi Applies a function to each character of a string.

Bonus functions:

Name Description
ft_lstnew Allocates a new list element.
ft_lstadd_front Adds an element to the beginning of a list.
ft_lstadd_back Adds an element to the end of a list.
ft_lstsize Counts the number of elements in a list.
ft_lstlast Returns the last element of a list.
ft_lstdelone Deletes a list element.
ft_lstclear Deletes all elements of a list.
ft_lstiter Iterates over a list and applies a function to each element.
ft_lstmap Iterates over a list and applies a function to each element to create a new list.

Helpful resources:

About

๐Ÿ“š Libft: My first project in 42 Madrid, where I recreate functions to explore their internal workings in C.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published