Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
yabtaour
GitHub Repository: yabtaour/Minishell-42
Path: blob/main/utils/ft_strlen.c
1407 views
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* ft_strlen.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: yabtaour <[email protected]> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2022/07/26 18:18:08 by yabtaour #+# #+# */
9
/* Updated: 2022/07/26 18:18:09 by yabtaour ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "../minishell.h"
14
15
int ft_strlen(char *str)
16
{
17
int i;
18
19
i = 0;
20
if (!str)
21
return (0);
22
while (str[i])
23
i++;
24
return (i);
25
}
26
27