Repository files navigation
Implementation of printf, dprintf and asprintf.
1. run Make at the root of the repository
2. include "ft_printf.h" in your main .c-file
3. compile your file with libftprintf.a
example: [ gcc your_file.c libftprintf.a -I./includes ]
%c: character
%d, %i: integer
%s: string
%p: pointer
%x, %X: hexadecimal
%o, %O: octal
%u: unsigned integer
%f: float
Flag
Description
0
zero-pad
[number]
width
+
attach a '+'-sign to positive numbers
-[number]
left-justified width
*
specify the value as one of the variable arguments
.
precision
[space]
pad non-negative numbers with one space character
Bonuses that C library printf does not handle:
eoc(end of colour)
red
green
blue
yellow
purple
cyan
black
white
Coverts an unsigned integer into binary string, add a number after a dot for precision (zero padding).
Banker's rounding on floats and doubles.
About
Implementation of printf, dprintf and asprintf.
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.