27 lines
1.0 KiB
C
27 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* .--. _ */
|
||
|
/* ft_strchr.c :+: :+: :+: */
|
||
|
/* |:_/ || |_ _ ___ __ */
|
||
|
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
|
||
|
/* (| | )|_| |_| |> < */
|
||
|
/* Created: 2022/11/22 13:34:05 by djonker /'\_ _/`\__|\__,_/_/\_\ */
|
||
|
/* Updated: 2023/02/07 00:40:50 by houtworm ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "../libft.h"
|
||
|
|
||
|
char *ft_strchr(const char *s, int c)
|
||
|
{
|
||
|
while (*s)
|
||
|
{
|
||
|
if (c == *s)
|
||
|
return ((char *)s);
|
||
|
s++;
|
||
|
}
|
||
|
if (c == *s)
|
||
|
return ((char *)s);
|
||
|
return (0);
|
||
|
}
|