-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strlen.c
37 lines (33 loc) · 1.17 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
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbutt <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/16 15:08:38 by mbutt #+# #+# */
/* Updated: 2019/03/19 15:23:02 by mbutt ### ########.fr */
/* */
/* ************************************************************************** */
/*
** The strlen() function computes the length of the string s.
*/
#include "libft.h"
size_t ft_strlen(const char *s)
{
size_t num;
num = 0;
while (s[num])
{
num++;
}
return (num);
}
/*
** int main(void)
** {
** char string[] = "Testing";
** printf("%zu", ft_strlen(string));
** return(0);
** }
*/