29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* :::::::: */
|
|
/* ft_strchr.c :+: :+: */
|
|
/* +:+ */
|
|
/* By: djonker <djonker@student.codam.nl> +#+ */
|
|
/* +#+ */
|
|
/* Created: 2022/11/22 13:34:05 by djonker #+# #+# */
|
|
/* Updated: 2023/10/18 17:00:15 by houtworm ######## odam.nl */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "../libft.h"
|
|
|
|
char *ft_strchr(const char *s, int c)
|
|
{
|
|
if (!s)
|
|
return (0);
|
|
while (*s)
|
|
{
|
|
if (c == *s)
|
|
return ((char *)s);
|
|
s++;
|
|
}
|
|
if (c == *s)
|
|
return ((char *)s);
|
|
return (0);
|
|
}
|