This project gives the opportunity to recode functions that already exist in different libraries in c programming language and others that are not. the goal is to take in hand some functions that will help us in the next projects of the 42 cursus.
ft_isascii
~ is it ASCII character?ft_isalnum
~ is it alphanumber character?ft_isalpha
~ is it alphabetic character?ft_isdigit
~ is it decimal-digit character?ft_isprint
~ is it printing character? (space character inclusive).ft_tolower
~ upper case to lower case letter conversion.ft_toupper
~ lower case to upper case letter conversion.
ft_bzero
~ write zeros to a byte string.ft_memset
~ write a byte to a byte string.ft_memchr
~ locate byte in byte string.ft_memcmp
~ compare byte string.ft_memmove
~ copy byte string.ft_memcpy
~ copy memory area.
ft_strlen
~ find out the length of the string.ft_strchr
~ locate character in string (first occurrence).ft_strrchr
~ locate character in string (last occurrence).ft_strnstr
~ locate a substring in a string (of limited size).ft_strncmp
~ compare strings (of limited size).ft_strlcpy
~ copy strings (of limited size).ft_strdup
~ save a copy of a string (using malloc).ft_strlcat
~ concatenate strings of limited size (second argument of the function into the first one).
ft_putchar_fd
~ output a character to given file.ft_putstr_fd
~ output string to given file.ft_putendl_fd
~ output string to given file with newline.ft_putnbr_fd
~ output integer to given file.ft_itoa
~ convert integer to ASCII string.ft_substr
~ extract substring from string.ft_strtrim
~ trim beginning and end of string with the specified characters.ft_strjoin
~ concatenate two strings into a new string (using malloc).ft_split
~ split string, with specified character as delimiter, into an array of strings.ft_strmapi
~ create new string from modifying string with specified function.ft_striteri
~ modify the string with the specified function if necessary. using the current character address.
ft_lstnew
~ create new list.ft_lstsize
~ count elements of a list.ft_lstlast
~ find last element of list.ft_lstadd_back
~ add new element at end of list.ft_lstadd_front
~ add new element at beginning of list.ft_lstdelone
~ delete element from list.ft_lstclear
~ delete sequence of elements of list from a starting point.ft_lstiter
~ apply function to content of all list's elements.ft_lstmap
~ apply function to content of all list's elements into new list.
To make a library without the linked list functions (bonus part) :
make
or
make all
if you need to use linked list functions, you can make it with a bonus target like this :
make bonus
To use libft in your code, you must add the include header to your code :
#include "libft.h"
and add the libft folder to your directory and when you compile your code, just link it like this:
gcc your "file .c" -lft -L path/to/libft.a -I path/to/libft.h
You can use these testers to test the functionality of functions :
After completing this project, I learned a lot of information about the basics of coding using C programming. Ultimately, the goal of this library is to be able to write clean code and know how to protect my functions and, of course, to familiarize myself with the library, which will help me a lot in future projects.