Custom reimplementation of the standard C printf() function. Provides a drop-in ft_printf() alternative designed for integration into libft and other C projects.
# Clone
git clone https://github.com/cmunoz-g/printf.git
cd printf
# Build static library
makeThis produces libftprintf.a.
Include it in your project:
#include "ft_printf.h"
...
ft_printf("Hello, %s!\\n", "world");Compile with:
gcc main.c -L. -lftprintf -o my_program%c— character%s— string%p— pointer (hexadecimal)%d— decimal integer%i— integer (base 10)%u— unsigned decimal%x— lowercase hexadecimal%X— uppercase hexadecimal%%— literal percent sign
- Variadic functions — uses
va_start,va_arg, andva_endto handle variable argument lists. - Modular design — separate functions for each conversion and formatting rule.