-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strevery.c
27 lines (25 loc) · 1.04 KB
/
ft_strevery.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_strevery.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ewilliam <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/11 16:18:24 by ewilliam #+# #+# */
/* Updated: 2016/12/11 17:22:17 by ewilliam ### ########.fr */
/* */
/* ************************************************************************** */
int ft_strevery(char *ar, int (*f)(char c))
{
int x;
if (!ar || !f)
return (0);
x = 0;
while (ar[x])
{
if (!f(ar[x]))
return (0);
x++;
}
return (1);
}