-
Notifications
You must be signed in to change notification settings - Fork 0
/
my_string_len.c
25 lines (22 loc) · 1021 Bytes
/
my_string_len.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* my_string_len.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yrhiba <yrhiba@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/01 23:25:04 by yrhiba #+# #+# */
/* Updated: 2023/05/03 10:19:04 by yrhiba ### ########.fr */
/* */
/* ************************************************************************** */
#include "libmystr.h"
int my_string_len(char *s)
{
int i;
if (!s)
return (-1);
i = 0;
while (s[i])
i++;
return (i);
}