-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathft_strlen.c
35 lines (31 loc) · 1.3 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
28
29
30
31
32
33
34
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cado-car <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/07/30 20:25:06 by cado-car #+# #+# */
/* Updated: 2021/07/30 20:25:06 by cado-car ### ########lyon.fr */
/* */
/* ************************************************************************** */
/*
* LIBRARY
* #include <string.h>
* DESCRIPTION
* The strlen() function computes the length of the string s.
* PARAMETERS
* #1. The string to compute length.
* RETURN VALUES
* The strlen() function returns the number of characters that precede the
* terminating NUL character.
*/
#include "libft.h"
int ft_strlen(const char *s)
{
size_t i;
i = 0;
while (s[i] != '\0')
i++;
return (i);
}