-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strclen.c
28 lines (25 loc) · 1.07 KB
/
ft_strclen.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strclen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jraymond <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/06/18 10:30:39 by jraymond #+# #+# */
/* Updated: 2018/06/18 17:40:29 by jraymond ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strclen(char *str, char c)
{
size_t len;
len = 0;
if (!c || !str)
return (ft_strlen(str));
else
{
while (str[len] && str[len] != c)
len++;
return (len);
}
}