-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strlen_count.c
33 lines (30 loc) · 1.07 KB
/
ft_strlen_count.c
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
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen_count.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: skarras <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/18 08:45:15 by skarras #+# #+# */
/* Updated: 2024/11/25 14:20:50 by skarras ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int strlen_count(const char *s)
{
int i;
int count;
count = 0;
i = 0;
while (s[i])
{
if (s[i] == '%')
{
i += 2;
continue ;
}
count++;
i++;
}
return (count);
}