-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strnequ.c
26 lines (23 loc) · 1.09 KB
/
ft_strnequ.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnequ.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gahubaul <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/11/30 17:08:17 by gahubaul #+# #+# */
/* Updated: 2015/11/30 17:08:17 by gahubaul ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_strnequ(char const *s1, char const *s2, size_t n)
{
char *str1;
char *str2;
str1 = (char *)s1;
str2 = (char *)s2;
if (ft_strncmp(str1, str2, n) == 0)
return (1);
else
return (0);
}