Libft is a project from the 42 school curriculum that requires you to recreate some of the standard C library functions.
Files
Here is a brief description of each of the .c files in my Libft project (some files are in the bonus folder):
ft_isalpha.c
This file contains the implementation of the isalpha function, which checks if a given character is an alphabetic character.
ft_isdigit.c
This file contains the implementation of the isdigit function, which checks if a given character is a digit.
ft_isalnum.c
This file contains the implementation of the isalnum function, which checks if a given character is an alphanumeric character.
ft_isascii.c
This file contains the implementation of the isascii function, which checks if a given character is an ASCII character.
ft_isprint.c
This file contains the implementation of the isprint function, which checks if a given character is a printable character.
ft_strlen.c
This file contains the implementation of the strlen function, which calculates the length of a given string.
ft_memset.c
This file contains the implementation of the memset function, which sets a block of memory to a given value.
ft_bzero.c
This file contains the implementation of the bzero function, which sets a block of memory to zero.
ft_memcpy.c
This file contains the implementation of the memcpy function, which copies a block of memory from source to destination.
ft_memmove.c
This file contains the implementation of the memmove function, which copies a block of memory from source to destination, even if the two blocks overlap.
ft_strlcpy.c
This file contains the implementation of the strlcpy function, which copies a string from source to destination, and ensures that the destination buffer is not overflowed.
ft_strlcat.c
This file contains the implementation of the strlcat function, which concatenates two strings and ensures that the destination buffer is not overflowed.
ft_toupper.c
This file contains the implementation of the toupper function, which converts a given character to uppercase.
ft_tolower.c
This file contains the implementation of the tolower function, which converts a given character to lowercase.
ft_strchr.c
This file contains the implementation of the strchr function, which searches a string for a given character and returns a pointer to the first occurrence of that character.
ft_strncmp.c
This file contains the implementation of the strncmp function, which compares two strings up to a certain number of characters.
ft_memchr.c
This file contains the implementation of the memchr function, which searches a block of memory for a given character and returns a pointer to the first occurrence of that character.
ft_memcmp.c
This file contains the implementation of the memcmp function, which compares two blocks of memory up to a certain number of bytes.
ft_strnstr.c
This file contains the implementation of the strnstr function, which searches a string for a given substring up to a certain number of characters.
ft_atoi.c
This file contains the implementation of the atoi function, which converts a string to an integer.
ft_calloc.c
This file contains the implementation of the calloc function, which allocates memory for a number of elements and initializes them to zero.
ft_strdup
This file contains the implementation of the strdup function, which duplicates a string. The function takes a string as input and returns a pointer to a new string that is a duplicate of the input string.
ft_substr.c
This file contains the implementation of the substr function, which extracts a substring from a given string.
ft_strjoin.c
This file contains the implementation of the strjoin function, which concatenates two strings.
ft_strtrim.c
This file contains the implementation of the strtrim function, which removes leading and trailing whitespace characters from a string.
ft_split.c
This file contains the implementation of the split function, which splits a string into an array of substrings based on a delimiter.
ft_itoa.c
This file contains the implementation of the itoa function, which converts an integer to a string.
ft_strmapi.c
This file contains the implementation of the strmapi function, which applies a function to each character of a string and returns a new string.
ft_striteri.c
This file contains the implementation of the striteri function, which applies a function to each character of a string.
ft_putchar_fd.c
This file contains the implementation of the putchar_fd function, which writes a character to a file descriptor.
ft_putstr_fd.c
This file contains the implementation of the putstr_fd function, which writes a string to a file descriptor.
ft_putendl_fd.c
This file contains the implementation of the putendl_fd function, which writes a string followed by a newline to a file descriptor.
ft_putnbr_fd.c
This file contains the implementation of the putnbr_fd function, which writes an integer to a file descriptor.
ft_lstnew.c
This file contains the implementation of the lstnew function, which creates a new linked list node.
ft_lstadd_front.c
This file contains the implementation of the lstadd_front function, which adds a node to the beginning of a linked list.
ft_lstsize.c
This file contains the implementation of the lstsize function, which counts the number of nodes in a linked list.
ft_lstlast.c
This file contains the implementation of the lstlast function, which returns a pointer to the last node in a linked list.
ft_lstadd_back
This file contains the implementation of the lstadd_back function, which takes a pointer to the first node of the list and a pointer to the new node, and it adds the new node to the end of the list.
ft_lstdelone
This file contains the implementation of the lstdelone function, which deletes a node from a linked list. The function takes a pointer to the node that needs to be deleted, and it frees the memory allocated to the node.
ft_lstclear
This file contains the implementation of the lstclear function, which deletes all the nodes from a linked list. The function takes a pointer to the first node of the list, and it frees the memory allocated to each node in the list.
ft_lstiter
This file contains the implementation of the lstiter function, which applies a function to each node of a linked list. The function takes a pointer to the first node of the list and a pointer to the function that needs to be applied to each node.
ft_lstmap
This file contains the implementation of the lstmap function, which creates a new linked list by applying a function to each node of an existing linked list. The function takes a pointer to the first node of the list and a pointer to the function that needs to be applied to each node. It returns a pointer to the first node of the new list.
ft_itoa
This file contains the implementation of the itoa function, which converts an integer to a string. The function takes an integer as input and returns a string that represents the integer.
ft_strrchr
This file contains the implementation of the strrchr function, which finds the last occurrence of a character in a string. The function takes a string and a character as input and returns a pointer to the last occurrence of the character in the string.