17 lines
197 B
C
17 lines
197 B
C
#include "libft.h"
|
|
|
|
char *strchr(const char *s, int c)
|
|
{
|
|
char *a;
|
|
|
|
a = (char *)s;
|
|
while (*a)
|
|
{
|
|
if (*a == (char)c)
|
|
return (a);
|
|
a++;
|
|
}
|
|
if (*a == (char)c)
|
|
return (a);
|
|
return (NULL);
|
|
}
|