-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strlen.c
35 lines (31 loc) · 1.16 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: tiagalex <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/21 14:52:40 by tiagalex #+# #+# */
/* Updated: 2024/10/21 14:52:40 by tiagalex ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
//Conta o tamanho da str.
size_t ft_strlen(const char *str)
{
int i;
i = 0;
while (str[i] != '\0')
{
i++;
}
return (i);
}
/*
int main(int argc, char **argv)
{
(void)argc;
printf ("%d\n", ft_strlen(argv[1]));
return 0;
}
*/