-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strlenre.c
23 lines (20 loc) · 1.02 KB
/
ft_strlenre.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlenre.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gahubaul <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/02/20 15:09:30 by gahubaul #+# #+# */
/* Updated: 2016/02/20 15:10:03 by gahubaul ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlenre(const char *str, const char c)
{
int i;
i = -1;
while (str[++i] != c && str[i] != '\0')
;
return (i);
}