-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_next_line_utils.c
35 lines (31 loc) · 1.11 KB
/
get_next_line_utils.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
27
28
29
30
31
32
33
34
35
/* ************************************************************************** */
/* */
/* :::::::: */
/* get_next_line_utils.c :+: :+: */
/* +:+ */
/* By: jaberkro <[email protected]> +#+ */
/* +#+ */
/* Created: 2022/01/19 21:12:19 by jaberkro #+# #+# */
/* Updated: 2022/01/19 21:16:52 by jaberkro ######## odam.nl */
/* */
/* ************************************************************************** */
int gnl_strlen(char *input)
{
int i;
i = 0;
while (input && input[i])
i++;
return (i);
}
int gnl_strchr_nl(char *input)
{
int i;
i = 0;
while (input && input[i])
{
if (input[i] == '\n')
return (i);
i++;
}
return (-1);
}