-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strlen.c
More file actions
28 lines (25 loc) · 1.02 KB
/
Copy pathft_strlen.c
File metadata and controls
28 lines (25 loc) · 1.02 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
28
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_strlen.c :+: :+: */
/* +:+ */
/* By: cherrewi <cherrewi@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2022/10/19 15:13:03 by cherrewi #+# #+# */
/* Updated: 2023/05/11 13:37:47 by cherrewi ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlen(const char *s)
{
size_t c;
if (s == NULL)
return (0);
c = 0;
while (*s)
{
s++;
c++;
}
return (c);
}