I'm trying to reproduce the strchr function, but it doesn't work with unicode.
{
char *ptr;
ptr = (char *) s;
if (c > 255)
return (ptr);
while (*ptr != c)
{
if (*ptr == '\0')
return (NULL);
ptr++;
}
return (ptr);
}
#include <stdio.h>
#include <string.h>
int main()
{
const char s[] = "īœ˙ˀ˘¯ˇ¸¯.œ«‘––™ª•¡¶¢˜ˀ";
printf("%s\n", strchr(s, 171));
printf("%s\n", ft_strchr(s, 171));
return (0);
}```