ft_strncmp - kibotrel/42-Libft GitHub Wiki

int	ft_strncmp(const char *s1, const char *s2, size_t n)

Description :

Compares the first n characters in the given strings s1 and s2.

Return Value :

Returns 0 if both strings are identical when n is reached or the result of *s1 - *s2, the first different character encountered (It also returns a difference when string's end is reached before n characters).

Source code