-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strlen.c
27 lines (23 loc) · 1.05 KB
/
ft_strlen.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: antandre <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/29 13:22:56 by antandre #+# #+# */
/* Updated: 2024/04/29 17:17:29 by antandre ### ########.fr */
/* */
/* ************************************************************************** */
#include <stddef.h>
/*
* Computes the length of a null-terminated string.
*/
size_t ft_strlen(const char *s)
{
size_t i;
i = 0;
while (s[i] != '\0')
i++;
return (i);
}