maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
list_repeat_check_str.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* list_repeat_check_str.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: rocky <marvin@42.fr> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/04/15 16:42:39 by rocky #+# #+# */
9
/* Updated: 2024/04/15 16:43:50 by rocky ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "
libft.h
"
14
15
int
list_repeat_check_str
(
char
*a[],
int
size)
16
{
17
int
i;
18
int
j;
19
20
i = 0;
21
while
(i < size - 1)
22
{
23
j = i + 1;
24
while
(j < size)
25
{
26
if
(
ft_strncmp
(a[i], a[j], size) == 0)
27
return
(1);
28
j++;
29
}
30
i++;
31
}
32
return
(0);
33
}
libft.h
ft_strncmp
int ft_strncmp(const char *s1, const char *s2, size_t n)
Definition
ft_strncmp.c:24
list_repeat_check_str
int list_repeat_check_str(char *a[], int size)
Definition
list_repeat_check_str.c:15
lib
libft
src
list_repeat_check_str.c
Generated by
1.9.8