The strnlen function returns the number of bytes in the string pointed to by s. The string length value does not include the terminating null character. The strnlen function counts bytes until the first null byte or until n bytes have been examined.