-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathft_nstrlen.c
More file actions
23 lines (20 loc) · 1.01 KB
/
ft_nstrlen.c
File metadata and controls
23 lines (20 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_nstrlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rlambert <rlambert@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/01/28 20:22:57 by rlambert #+# #+# */
/* Updated: 2015/01/28 20:24:06 by rlambert ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_nstrlen(const char *str, size_t maxlen)
{
size_t i;
i = 0;
while (*str++ && i < maxlen)
i++;
return (i);
}