#include "libft.h"

char	*ft_strnstr_nullterminated(const char *big, const char *little, size_t len)
{
	size_t	len_l;

	if (*little == 0)
		return ((char *)big);
	len_l = ft_strlen(little);
	while (len-- >= len_l)
	{
		if (*big == *little && ft_strncmp(big, little, len_l) == 0)
			return ((char *)big);
		big++;
	}
	return (NULL);
}