-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strlen.c
More file actions
30 lines (27 loc) · 1.05 KB
/
ft_strlen.c
File metadata and controls
30 lines (27 loc) · 1.05 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: musajid <musajid@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/23 18:52:24 by musajid #+# #+# */
/* Updated: 2025/05/23 19:02:47 by musajid ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlen(const char *c)
{
int i;
i = 0;
if (!c)
return (0);
if (c[i] != '\0')
{
while (c[i] != '\0')
++i;
return (i);
}
else
return (0);
}