-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_printf_char.c
More file actions
26 lines (23 loc) · 1.11 KB
/
ft_printf_char.c
File metadata and controls
26 lines (23 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_char.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dporhomo <dporhomo@student.42prague.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/02 15:29:22 by dporhomo #+# #+# */
/* Updated: 2025/12/09 10:25:59 by dporhomo ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_print_char(char c, t_flags flags)
{
int count;
count = 0;
if (flags.left == 1)
write(1, &c, 1);
count += ft_print_padding(flags.width, 1, 0);
if (flags.left == 0)
write(1, &c, 1);
return (count + 1);
}