This is a printf function recoded, with limited specifiers and flags. Because putnbr and putstr aren’t enough!
Basically, this printf works on demand. It goes through the string and, at each step, prints the character found. (Like a char machine gun - the char found is printed and counted). If printf finds the formatting character '%', it stores the formatting instructions (the flags) in a structure to later format the output according to the stored flags.
Below, a ft_printf's logic:
ft_printf42 é um projeto para recodificar o printf em C da libc. Ele irá gerenciar as seguintes conversões: cspdiuxX% ! Gerenciar qualquer combinação dos seguintes sinalizadores: '-0.' e largura mínima do campocom todas as conversões. Gerenciar todos os seguintes sinalizadores: '# +' (sim, um deles é um espaço). Entregando os arquivos: * .c, * / *. c, * .h, * / *. h, Makefile.
ft_printf42 is a project to recode printf in C from libc. It will manage the following conversions: cspdiuxX% ! Handle any combination of the following flags: '-0.' and minimum field width with all conversions. Manage all of the following flags: '#+' (yes, one of them is a space). Delivering the files: * .c, * / *. c, * .h, * / *. h, Makefile.
- Rigor
- Algorithms & AI
🚧 project:
ft_printf42 $ make bonus
Compile your main with the library:
clang main.c libftprintf.a
🚿 Clean Obj files:
$ make clean
🚿 🚿 Clean All (obj files + binary):
$ make fclean
🚿 🚿 🚧 Clean All + build:
$ make re
See Makefile