-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strlen.c
34 lines (29 loc) · 1.11 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vangirov <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/18 20:15:42 by vangirov #+# #+# */
/* Updated: 2021/12/02 22:06:48 by vangirov ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlen(const char *s)
{
size_t len;
len = 0;
while (*s)
{
len++;
s++;
}
return (len);
}
// #include <stdio.h>
// int main()
// {
// char *string = "Hello!";
// printf("%ld\n", ft_strlen(string));
// }