files dans srcs sans dossier

This commit is contained in:
Hugo LAMY
2020-02-10 10:25:04 +01:00
parent e9c7619e97
commit 52eaaddb0d
76 changed files with 10 additions and 12 deletions

26
srcs/ft_any.c Normal file
View File

@@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_any.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/16 15:14:49 by hulamy #+# #+# */
/* Updated: 2018/11/16 15:14:53 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_any(char **tab, int (*f)(char*))
{
int i;
i = -1;
if (!tab)
return (0);
while (tab[++i])
if (f(tab[i]) == 1)
return (1);
return (0);
}