-
Notifications
You must be signed in to change notification settings - Fork 2
/
ft_strlen.c
29 lines (25 loc) · 1.06 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adiaz-lo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/20 11:54:28 by adiaz-lo #+# #+# */
/* Updated: 2020/01/14 09:27:36 by adiaz-lo ### ########.fr */
/* */
/* ************************************************************************** */
/*
** This function returns the length of a string.
*/
#include "libft.h"
size_t ft_strlen(const char *s)
{
size_t lenght;
lenght = 0;
while (*s++)
{
lenght++;
}
return (lenght);
}