-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcchr.c
24 lines (21 loc) · 1021 Bytes
/
ft_strcchr.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: stales <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/27 22:02:27 by stales #+# #+# */
/* Updated: 2022/02/27 22:04:29 by stales ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_strcchr(char *str, char c)
{
int i;
i = 0;
while (*str)
if (*str++ == c)
i++;
return (i);
}