|
libft
|
Precision formatting for integer values in ft_printf.
More...
#include "libft.h"
Include dependency graph for handle_precision_int.c:Functions | |
| static char * | apply_precision_zero_padding (t_pf *pf, char *str, int *len, int is_neg) |
| Pads integer string with leading zeros to match precision. | |
| static char * | handle_hashflag_zero_prec (int *len, char *str, t_pf *pf) |
Handles edge case for "0" with precision set to 0. | |
| char * | handle_precision_int (t_fmt *fmt, char *str, int *len, t_pf *pf) |
| Applies precision formatting to a numeric string. | |
Precision formatting for integer values in ft_printf.
This file provides helpers to apply precision rules to numeric output (for d, i, u, x, X). It handles leading zeros, negative signs, and special behaviors like empty output when the value is zero and the precision is also zero.
These functions operate in conjunction with the t_fmt format specifier and update internal state using t_pf.