-
Notifications
You must be signed in to change notification settings - Fork 0
/
libft.c
executable file
·33 lines (29 loc) · 1.1 KB
/
libft.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sdurr <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/08/18 11:23:53 by sdurr #+# #+# */
/* Updated: 2014/08/18 17:35:12 by sdurr ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft.h"
#include <unistd.h>
#include <stdlib.h>
int ft_strlen(char *str)
{
int cpt;
cpt = 0;
while (*str != '\0')
{
str++;
cpt++;
}
return (cpt);
}
void ft_putstr(char *str)
{
write(1, str, ft_strlen(str));
}