-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathft_strclen.c
27 lines (24 loc) · 1.05 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strclen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gamarcha <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/05/04 22:14:33 by gamarcha #+# #+# */
/* Updated: 2021/06/02 16:31:10 by gamarcha ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strclen(const char *s, const char *charset)
{
size_t i;
i = 0;
while (s[i])
{
if (ft_ischarset(s[i], charset))
break ;
i++;
}
return (i);
}