🖨 Self-made implementation of printf
As printf in C:
#include <ft_printf.h>
int ft_printf(const char *format, ...);
| - | Left-justify within the given field width; Right justification is the default (see width sub-specifier). |
| + | Forces to preceed the result with a plus or minus sign (+ or -) even for positive numbers. By default, only negative numbers are preceded with a - sign. |
| (space) | If no sign is going to be written, a blank space is inserted before the value. |
| # | Used with o, x or X specifiers the value is preceeded with 0, 0x or 0X respectively for values different than zero. Used with a, A, e, E, f, F, g or G it forces the written output to contain a decimal point even if no more digits follow. By default, if no digits follow, no decimal point is written. |
| 0 | Left-pads the number with zeroes (0) instead of spaces when padding is specified (see width sub-specifier). |
| length | d i | u o x X | f F e E g G a A | c | s | p |
| hh | int | unsigned int | double | int | char* | void* |
| h | short int | unsigned short int | ||||
| l | long int | unsigned long int | wint_t | wchar_t* | ||
| ll | long long int | unsigned long long int | ||||
| j | intmax_t | uintmax_t | ||||
| z | size_t | size_t | ||||
| L | long double |