-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbyte_array_has.c
More file actions
27 lines (24 loc) · 1.06 KB
/
byte_array_has.c
File metadata and controls
27 lines (24 loc) · 1.06 KB
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
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* byte_array_has.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: oadhesiv <oadhesiv@student.21-school.ru> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/12 17:44:51 by oadhesiv #+# #+# */
/* Updated: 2019/07/12 17:47:06 by oadhesiv ### ########.fr */
/* */
/* ************************************************************************** */
#include "array.h"
t_byte byte_array_has(t_byte_array *arr, t_byte data)
{
size_t i;
i = 0;
while (i < arr->used)
{
if (arr->data[i] == data)
return (1);
i++;
}
return (0);
}