fillit/libft/ft_strchr.c

23 lines
1 KiB
C
Raw Normal View History

2016-12-26 18:48:33 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/30 18:14:04 by gtertysh #+# #+# */
/* Updated: 2016/11/30 18:29:27 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strchr(const char *s, int c)
{
while (*s && *s != (char)c)
s++;
if (*s == (char)c)
return ((char *)s);
return (NULL);
}