-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strlen.c
More file actions
30 lines (26 loc) · 1.24 KB
/
ft_strlen.c
File metadata and controls
30 lines (26 loc) · 1.24 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
29
30
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_strlen.c :+: :+: */
/* +:+ */
/* By: cwesseli <cwesseli@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2022/10/10 09:27:49 by cwesseli #+# #+# */
/* Updated: 2022/10/14 13:03:15 by cwesseli ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlen(const char *s)
{
int i;
i = 0;
while (s[i])
i++;
return (i);
}
// DESCRIPTION
// The strlen() function calculates the length of the string pointed
// to by s, excluding the terminating null byte ('\0').
// RETURN VALUE
// The strlen() function returns the number of bytes in the string
// pointed to by s.