24 lines
1.0 KiB
C
24 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_strchr.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2015/11/27 09:50:37 by gbrochar #+# #+# */
|
||
|
/* Updated: 2019/02/08 11:50:45 by gbrochar ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
char *ft_strchr(const char *s, int c)
|
||
|
{
|
||
|
if (s == NULL)
|
||
|
return (0);
|
||
|
while (*s != (char)c)
|
||
|
if (!*s++)
|
||
|
return (0);
|
||
|
return ((char *)s);
|
||
|
}
|