24 lines
1.0 KiB
C
24 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strchr.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: scebula <scebula@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2015/11/26 09:10:36 by scebula #+# #+# */
|
|
/* Updated: 2015/11/26 09:22:12 by scebula ### ########.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;
|
|
else
|
|
return (NULL);
|
|
}
|