This project has been created as part of the 42 curriculum by swaragay.
This project is a custom implementation of the hidden yet versatile printf function from the standard C library (libft). The goal of ft_printf is to mimic the behavior of the original printf, handling various format specifiers and managing variable numbers of arguments (variadic functions) without using the standard library's buffer management.
%c: Prints a single character.%s: Prints a string (handlesNULLpointers by displaying(null)).%p: Prints avoid *pointer argument in hexadecimal format (prefixed with0x, handlesNULLpointers by displaying(nil)).%d/%i: Prints a signed base 10 integer (fully supportsINT_MIN).%u: Prints an unsigned base 10 decimal 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.
The library is compiled using cc with -Wall -Wextra -Werror flags.
To compile the library and generate libftprintf.a:
make: Compiles the mandatory functions and creates the library.
make clean: Removes all generated object files (.o).make fclean: Removes all object files and the compiledlibftprintf.alibrary.make re: Forces a complete recompilation from scratch (equivalent tomake fclean && make).
- C言語の基礎知識 - printf: (https://www.ne.jp/asahi/hishidama/home/tech/c/c.html#printf)`*.c`.
- Qiita - C言語の可変長引数の関数の作り方: (https://qiita.com/subaruf/items/657c67a1809515589a7c)
ft_printf.c. - WIKIBOOKS - stdarg.h: (https://ja.wikibooks.org/wiki/C%E8%A8%80%E8%AA%9E/%E6%A8%99%E6%BA%96%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA/stdarg.h)
ft_printf.c. - コッコ隊長の勉強部屋 - stdarg.hの使い方: (https://captain-cocco.com/stdarg-h-c-standart-library/)
ft_printf.c.
AI (Gemini) was utilized in the following aspects of this project: Documentation: Assisted in structuring, formatting, and generating this README.md to perfectly align with the curriculum guidelines.