-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strlen.c
30 lines (27 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pix <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/17 17:56:04 by pix #+# #+# */
/* Updated: 2022/04/04 03:08:04 by pix ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Calculate the length of a string
*
* @param str String to mesure
*
* @return (int) Length of the strings
*/
int ft_strlen(char *str)
{
char *tmp;
tmp = str;
while (*str)
str++;
return (str - tmp);
}