-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strlen.c
63 lines (46 loc) · 1.42 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: musenov <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/13 16:26:30 by musenov #+# #+# */
/* Updated: 2022/12/06 13:30:43 by musenov ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlen(const char *str)
{
size_t i;
i = 0;
while (*(str + i) != '\0')
{
i++;
}
return (i);
}
/*
ft_strlen:
PARAMETERS
-/-
RETURN VALUE
The strlen() function returns the number of characters that precede the
terminating NUL character.
DESCRIPTION
The strlen() function computes the length of the string s.
The strnlen() function attempts to compute the length of s, but never scans
beyond the first maxlen bytes of s.
QUESTIONS
-/-
ANSWER
-/-
COMPARE
-/-
ALTERNATIVE SOLUTION
-/-
EXPLANATION
-/-
REMARK
-/-
*/