28 lines
1.0 KiB
C
28 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strlen.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: pbonilla <eirodeis.lepnj@gmail.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2020/10/29 12:32:56 by pbonilla #+# #+# */
|
|
/* Updated: 2021/02/18 16:27:54 by pbonilla ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
size_t ft_strlen(const char *s)
|
|
{
|
|
char *buff;
|
|
size_t i;
|
|
|
|
buff = (char *)s;
|
|
if (!buff)
|
|
return (0);
|
|
i = -1;
|
|
while (buff[++i])
|
|
;
|
|
return (i);
|
|
}
|