16 lines
167 B
C
16 lines
167 B
C
#include "utils.h"
|
|
|
|
ssize_t ft_strnchr(char *str, char c)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
while (str[i] != '\0')
|
|
{
|
|
if (str[i] == c)
|
|
return (i);
|
|
i++;
|
|
}
|
|
return (-1);
|
|
}
|