char *strnchr(const char *str,
              size_t n,
              int ch);

strnchr searches not more than n characters to locate the first occurrence of c (converted to a char) in the string pointed to by s. The terminating null character is considered to be part of the string.

strnchr returns a pointer to the located character, or a null pointer if c does not occur in the string.