This is a project for creating a library in C, containing a collection of functions that replicate the behavior of standard library functions. The project is divided into mandatory and additional parts, each containing a set of functions to implement.
In this part, the behavior of standard libc functions are replicated with names prefixed by ft_. Functions to implement include:
isalphaisdigitisalnumisasciiisprintstrlenmemsetbzeromemcpymemmovestrlcpystrlcattouppertolowerstrchrstrrchrstrncmpmemchrmemcmpstrnstratoicallocstrdup
This part involves creating additional functions that either complement the libc functions or provide new functionality. Functions to implement include:
ft_substrft_strjoinft_strtrimft_splitft_itoaft_strmapift_striterift_putchar_fdft_putstr_fdft_putendl_fdft_putnbr_fd
The Bonus functions give some insight about linked lists:
ft_lstadd_back.cft_lstadd_front.cft_lstclear.cft_lstdelone.cft_lstiter.cft_lstlast.cft_lstmap.cft_lstnew.cft_lstsize.c
My libft also inludes a custom implementation of the printf() function from the C standard library. The function ft_printf() will mimic the behavior of the original printf() and will handle various format specifiers.
Supported Conversions:
%c: Prints a single character.
%s: Prints a string (as defined by the common C convention).
%p: The void * pointer argument will be printed in hexadecimal format.
%d: Prints a decimal (base 10) number.
%i: Prints an integer in base 10.
%u: Prints an unsigned decimal (base 10) number.
%x: Prints a number in hexadecimal (base 16) lowercase format.
%X: Prints a number in hexadecimal (base 16) uppercase format.
%%: Prints a percent sign.
Get_next_line is included in this libft as well which is a function that reads a line from a file descriptor and returns it. It implements a buffer which can be changed with the Compiler flag -D BUFFER_SIZE=n.
A Makefile is required to compile the source files to the required output with specific flags (-Wall -Wextra -Werror). It should include rules for $(NAME), all, clean, fclean, and re. Additionally, if bonuses are implemented, a bonus rule should be included.
Submit the following files:
Makefilelibft.h- All
ft_*.cfiles
Ensure that your project follows the norms outlined in the project requirements to avoid penalties during evaluation.