1
Files
Tom CHIVERT 1c9092caaf Norminette
2019-09-04 05:17:54 +02:00

30 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchivert <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/04 19:12:34 by tchivert #+# #+# */
/* Updated: 2019/09/04 05:13:31 by tchivert ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strchr(const char *s, int c)
{
int i;
i = 0;
while (s[i])
{
if (s[i] == c)
return ((char *)s + i);
i++;
}
if (c == '\0')
return ((char *)s + i);
return (NULL);
}